Skip to content

[Snyk] Security upgrade sharp from 0.32.6 to 0.35.5 - #13354

Open
sestinj wants to merge 1 commit into
mainfrom
snyk-fix-3387a6cc7dd7a3011b0193d80ff60adf
Open

sestinj wants to merge 1 commit into
mainfrom
snyk-fix-3387a6cc7dd7a3011b0193d80ff60adf

Conversation

@sestinj

@sestinj sestinj commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • core/vendor/modules/@xenova/transformers/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Use After Free
SNYK-JS-SHARP-20552492
  838  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Use After Free

…vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-SHARP-20552492
@sestinj

sestinj commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Merge Risk: High

The upgrade from sharp v0.32.6 to v0.35.5 is a high-risk update involving multiple breaking changes across three minor versions (v0.33, v0.34, v0.35). This upgrade requires significant attention to both environment and code.

Key Breaking Changes:

1. Environment & Installation:

  • Node.js Version: Support for Node.js 18 has been dropped. The new minimum required version is Node.js >= 20.9.0.
  • Installation Mechanism: The installation process has been overhauled. Since v0.33.0, prebuilt binaries are fetched from the npm registry, which has been known to cause issues with certain package managers like pnpm. In v0.35.0, the install script was removed entirely, meaning manual intervention may be needed if a prebuilt binary is not available for your platform.

2. API & Code Changes:

  • v0.35.0:
    • Removed the deprecated failOnError constructor property.
    • Removed the deprecated paletteBitDepth from the metadata response.
    • Removed deprecated properties from the sharpen operation.
    • Renamed format.jp2k to format.jp2 for API consistency.
  • v0.34.0:
    • The behavior of removeAlpha was changed to ensure it removes all alpha channels.
    • Non-animated GIF output now defaults to no-loop instead of looping forever.
  • v0.33.0:
    • The withMetadata() function is partially deprecated in favor of withExif() and withIccProfile().
    • Options for the trim() operation must now be passed as an Object.

Recommendation:

  1. Verify Node.js Version: Ensure your deployment environment runs Node.js v20.9.0 or newer.
  2. Test Installation: Run a clean install in your CI/CD environment to validate that the new package installation method works correctly with your setup.
  3. Audit Code: Review your codebase for usage of the removed or changed APIs listed above, especially failOnError, paletteBitDepth, sharpen, format.jp2k, and trim().

Source: Sharp Changelog

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@sestinj
sestinj requested a review from a team as a code owner October 7, 2026 10:52

This branch has not been deployed

No deployments
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.

2 participants