Skip to content

chore(deps): update dependency sharp to ^0.35.0 [security] - #476

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-sharp-vulnerability
Open

chore(deps): update dependency sharp to ^0.35.0 [security]#476
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-sharp-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Jun 18, 2022

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
sharp (source, changelog) ^0.26.2^0.35.0 age confidence

sharp vulnerable to Command Injection in post-installation over build environment

CVE-2022-29256 / GHSA-gp95-ppv5-3jc5

More information

Details

There's a possible vulnerability in logic that is run only at npm install time when installing versions of sharp prior to the latest v0.30.5.

This is not part of any runtime code, does not affect Windows users at all, and is unlikely to affect anyone that already cares about the security of their build environment. However, out of an abundance of caution, I've created this advisory.

If an attacker has the ability to set the value of the PKG_CONFIG_PATH environment variable in a build environment then they might be able to use this to inject an arbitrary command at npm install time.

I've used the Common Vulnerability Scoring System (CVSS) calculator to determine the maximum possible impact, which suggests a "medium" score of 5.9, but for most people the real impact will be dealing with the noise from automated security tooling that this advisory will bring.

AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C/CR:X/IR:X/AR:X/MAV:X/MAC:X/MPR:X/MUI:R/MS:X/MC:X/MI:X/MA:X

This problem was fixed in commit a6aeef6 and published as part of sharp v0.30.5.

Thank you very much to @​dwisiswant0 for the responsible disclosure.

Remember: if an attacker has control over environment variables in your build environment then you have a bigger problem to deal with than this issue.

Severity

  • CVSS Score: 6.5 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


sharp vulnerability in libwebp dependency CVE-2023-4863

GHSA-54xq-cgqr-rpm3

More information

Details

Overview

sharp uses libwebp to decode WebP images and versions prior to the latest 0.32.6 are vulnerable to the high severity GHSA-j7hp-h8jx-5ppr.

Who does this affect?

Almost anyone processing untrusted input with versions of sharp prior to 0.32.6.

How to resolve this?
Using prebuilt binaries provided by sharp?

Most people rely on the prebuilt binaries provided by sharp.

Please upgrade sharp to the latest 0.32.6, which provides libwebp 1.3.2.

Using a globally-installed libvips?

Please ensure you are using the latest libwebp 1.3.2.

Possible workaround

Add the following to your code to prevent sharp from decoding WebP images.

sharp.block({ operation: ["VipsForeignLoadWebp"] });

Severity

  • CVSS Score: 7.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


sharp inherited vulnerabilities in libvips: CVE-2026-33327, CVE-2026-33328, CVE-2026-35590, CVE-2026-35591

GHSA-f88m-g3jw-g9cj

More information

Details

Impact

A number of vulnerabilities, two rated as "High" severity using CVSSv4, have been discovered and fixed in the upstream libvips dependency.

Those processing untrusted input with versions of sharp prior to 0.35.0 are affected.

Patches
Using prebuilt binaries provided by sharp?

Most people rely on the prebuilt binaries provided by sharp.

Please upgrade sharp to the latest version, currently 0.35.3, which provides libvips 8.18.3.

Using a globally-installed libvips?

Please ensure you are using the latest libvips 8.18.3.

Workarounds

Add the following to your code to prevent sharp from decoding GIF, TIFF and VIPS images.

sharp.block({ operation: ["VipsForeignLoadNsgif", "VipsForeignLoadTiff", "VipsForeignLoadVips"] });

Severity

  • CVSS Score: 7.0 / 10 (High)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

lovell/sharp (sharp)

v0.35.0

Compare Source

  • Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0.

  • Breaking: Remove install script from package.json file.
    Compiling from source is now opt-in via the build script.

  • Breaking: Lossy AVIF output is now tuned using SSIMULACRA2-based iq quality metrics.

  • Breaking: Add limitInputChannels with a default value of 5.

  • Breaking: Remove deprecated failOnError constructor property.

  • Breaking: Remove deprecated paletteBitDepth from metadata response.

  • Breaking: Remove deprecated properties from sharpen operation.

  • Breaking: Rename format.jp2k as format.jp2 for API consistency.

  • Upgrade to libvips v8.18.3 for upstream bug fixes.

  • Remove experimental status from WebAssembly binaries.

  • Add prebuilt binaries for FreeBSD (WebAssembly).

  • Deprecate Windows 32-bit (win32-ia32) prebuilt binaries.

  • Ensure TIFF output bitdepth option is limited to 1, 2 or 4.

  • Add AVIF/HEIF tune option for control over quality metrics.
    #​4227

  • Add keepGainMap and withGainMap to process HDR JPEG images with embedded gain maps.
    #​4314

  • Add toUint8Array for output image as a TypedArray backed by a transferable ArrayBuffer.
    #​4355

  • Require prebuilt binaries using static paths to aid code bundling.
    #​4380

  • TypeScript: Ensure FormatEnum keys match reality.
    #​4475

  • Add margin option to trim operation.
    #​4480
    @​eddienubes

  • Ensure HEIF primary item is used as default page/frame.
    #​4487

  • Add image Media Type (MIME Type) to metadata response.
    #​4492

  • Add withDensity to set output density in EXIF metadata.
    #​4496

  • Improve pkg-config path discovery.
    #​4504

  • Add WebP exact option for control over transparent pixel colour values.

  • Add support for ECMAScript Modules (ESM).
    #​4509
    @​florian-lefebvre

v0.34.5

Compare Source

  • Upgrade to libvips v8.17.3 for upstream bug fixes.

  • Add experimental support for prebuilt Linux RISC-V 64-bit binaries.

  • Support building from source with npm v12+, deprecate --build-from-source flag.
    #​4458

  • Add support for BigTIFF output.
    #​4459
    @​throwbi

  • Improve error messaging when only warnings issued.
    #​4465

  • Simplify ICC processing when retaining input profiles.
    #​4468

v0.34.4

Compare Source

  • Upgrade to libvips v8.17.2 for upstream bug fixes.

  • Ensure TIFF subifd and OpenSlide level input options are respected (regression in 0.34.3).

  • Ensure autoOrient occurs before non-90 angle rotation.
    #​4425

  • Ensure autoOrient removes existing metadata after shrink-on-load.
    #​4431

  • TypeScript: Ensure KernelEnum includes linear.
    #​4441
    @​BayanBennett

  • Ensure unlimited flag is passed upstream when reading TIFF images.
    #​4446

  • Support Electron memory cage when reading XMP metadata (regression in 0.34.3).
    #​4451

  • Add sharp-libvips rpath for yarn v5 support.
    #​4452
    @​arcanis

v0.34.3

Compare Source

v0.34.2

Compare Source

v0.34.1

Compare Source

v0.34.0

Compare Source

v0.33.5

Compare Source

v0.33.4

Compare Source

v0.33.3

Compare Source

v0.33.2

Compare Source

v0.33.1

Compare Source

v0.33.0

Compare Source

v0.32.6

Compare Source

v0.32.5

Compare Source

v0.32.4

Compare Source

v0.32.3

Compare Source

v0.32.2

Compare Source

v0.32.1

Compare Source

v0.32.0

Compare Source

v0.31.3

Compare Source

v0.31.2

Compare Source

v0.31.1

Compare Source

v0.31.0

Compare Source

v0.30.7

Compare Source

v0.30.6

Compare Source

v0.30.5

Compare Source

v0.30.4

Compare Source

v0.30.3

Compare Source

v0.30.2

Compare Source

v0.30.1

Compare Source

v0.30.0

Compare Source

v0.29.3

Compare Source

v0.29.2

Compare Source

v0.29.1

Compare Source

v0.29.0

Compare Source

v0.28.3

Compare Source

v0.28.2

Compare Source

v0.28.1

Compare Source

v0.28.0

Compare Source

v0.27.2

Compare Source

v0.27.1

Compare Source

v0.27.0

Compare Source

v0.26.3

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 9f5881b to f6605da Compare November 16, 2023 21:05
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] chore(deps): update dependency sharp to ^0.32.0 [security] Nov 16, 2023
@renovate

renovate Bot commented Nov 16, 2023

Copy link
Copy Markdown
Author

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
ERROR: npm v10.2.4 is known not to run on Node.js v12.22.12.  This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.

ERROR:
/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/utils/exit-handler.js:19
  const hasLoadedNpm = npm?.config.loaded
                           ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/cli-entry.js:15:23)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/es6/validate-engines.js:39:10)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/cli.js:4:31)
ERROR: npm v10.2.4 is known not to run on Node.js v12.22.12.  This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.

ERROR:
/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/utils/exit-handler.js:19
  const hasLoadedNpm = npm?.config.loaded
                           ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/cli-entry.js:15:23)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/es6/validate-engines.js:39:10)
    at module.exports (/opt/containerbase/tools/npm/10.2.4/node_modules/npm/lib/cli.js:4:31)

@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from f6605da to 9cdb6ba Compare August 6, 2024 06:09
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.32.0 [security] chore(deps): update dependency sharp to ^0.30.0 [security] Aug 6, 2024
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch 2 times, most recently from 60cad2a to bc12e5b Compare August 13, 2025 14:41
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] chore(deps): update dependency sharp to ^0.32.0 [security] Aug 13, 2025
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from bc12e5b to 3a7f958 Compare October 15, 2025 22:40
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.32.0 [security] chore(deps): update dependency sharp to ^0.30.0 [security] Oct 15, 2025
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 3a7f958 to 6f2a46b Compare November 18, 2025 10:05
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 6f2a46b to f275328 Compare January 19, 2026 19:29
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from f275328 to d6d506b Compare February 2, 2026 21:34
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from d6d506b to 091d80f Compare February 12, 2026 12:10
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 091d80f to e25a437 Compare March 13, 2026 19:05
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] chore(deps): update dependency sharp to ^0.30.0 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-sharp-vulnerability branch March 27, 2026 00:56
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] - autoclosed chore(deps): update dependency sharp to ^0.30.0 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch 2 times, most recently from e25a437 to 67eeaaf Compare March 30, 2026 21:06
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] chore(deps): update dependency sharp to ^0.30.0 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] - autoclosed chore(deps): update dependency sharp to ^0.30.0 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch 2 times, most recently from 67eeaaf to bf7820e Compare April 27, 2026 22:20
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from bf7820e to de1a578 Compare May 12, 2026 15:33
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from de1a578 to 574c6fd Compare May 28, 2026 16:06
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 574c6fd to 496b565 Compare June 11, 2026 17:07
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 496b565 to 988bf5a Compare July 12, 2026 13:29
@renovate renovate Bot changed the title chore(deps): update dependency sharp to ^0.30.0 [security] chore(deps): update dependency sharp to ^0.35.0 [security] Aug 26, 2026
@renovate
renovate Bot force-pushed the renovate/npm-sharp-vulnerability branch from 988bf5a to 05fa7b0 Compare August 26, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants