Skip to content

Update sharp in the test dependencies to fix a librsvg advisory - #25

Merged
Gabriel Mongefranco (gabrielmongefranco) merged 1 commit into
mainfrom
fix/sharp-librsvg-advisory
Oct 8, 2026
Merged

Gabriel Mongefranco (gabrielmongefranco) merged 1 commit into
mainfrom
fix/sharp-librsvg-advisory

Conversation

@gabrielmongefranco

Copy link
Copy Markdown
Contributor

What changed

This updates sharp from 0.35.4 to 0.35.5 in tests/package-lock.json, along with its matching libvips platform packages (1.3.3 to 1.3.4). It fixes Dependabot alert 1, advisory GHSA-wq5f-xc86-pv6w.

Why

The librsvg library bundled with sharp 0.35.4 has a memory bug. A crafted SVG image could use it to run code on glibc-based Linux. Sharp 0.35.5 ships the patched librsvg 2.63.2.

Where sharp comes from

Sharp is not a direct dependency of this project. The Node build of Transformers.js depends on it for loading images, and the model tests install that build. The app loads the browser build of Transformers.js from a CDN and never uses sharp, so the app and its users were never exposed. The model tests only process text and never decode an image, so the practical risk in CI was also low.

tests/package.json already allows ^0.35.4 through Transformers.js, so only the lockfile changes.

Testing

  • npm audit in tests/ reports 0 vulnerabilities.
  • npm ci --prefix tests, then node --test tests/crisis-models.test.mjs tests/rerank-models.test.mjs tests/skill-offer-models.test.mjs: 321 passed, 0 failed.

Sharp 0.35.4 bundles a librsvg build with a memory bug that a crafted
SVG image could use to run code on glibc-based Linux
(GHSA-wq5f-xc86-pv6w). Sharp 0.35.5 ships the patched librsvg 2.63.2.

Sharp is not a direct dependency. It comes in through the Node build of
Transformers.js, which the model tests install. The app itself loads the
browser build from a CDN and never uses sharp. The existing ^0.35.4 range
already allows 0.35.5, so only the lockfile changes.
@gabrielmongefranco
Gabriel Mongefranco (gabrielmongefranco) merged commit a2fcc6e into main Oct 8, 2026
2 checks passed
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.

1 participant