GHSA-f88m-g3jw-g9cj: Sharp before 0.35.0 Multiple Vulnerabilities via Bundled libvips Image Decoders
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. js sharp.block({ operation: ["VipsForeignLoadNsgif", "VipsForeignLoadTiff", "VipsForeignLoadVips"] });
Other sources
Sharp before 0.35.0 bundles a version of libvips affected by multiple vulnerabilities (CVE-2026-33327, CVE-2026-33328, CVE-2026-35590, CVE-2026-35591 and CVE-2026-69242) in its GIF, TIFF and VIPS image decoders. Attackers can supply crafted GIF, TIFF or VIPS files to applications using sharp to process untrusted input, triggering these libvips flaws.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/sharpto a version that resolves this vulnerability.Fixed in 0.35.0 - Upgrade
Upgrade
libvipsto a version that resolves this vulnerability.Fixed in 8.18.3 - Upgrade
Upgrade
sharpto a version that resolves this vulnerability.Fixed in 0.35.3 - Configuration
Add sharp.block({ operation: ["VipsForeignLoadNsgif", "VipsForeignLoadTiff", "VipsForeignLoadVips"] }); to prevent decoding GIF, TIFF, and VIPS images.
sharp block.operation = VipsForeignLoadNsgif, VipsForeignLoadTiff, VipsForeignLoadVips
Event History
Frequently Asked Questions
What is the severity of GHSA-f88m-g3jw-g9cj?
GHSA-f88m-g3jw-g9cj is rated with a severity of 60, classified as high severity using CVSSv4.
How do I fix GHSA-f88m-g3jw-g9cj?
To fix GHSA-f88m-g3jw-g9cj, update the sharp package to version 0.35.0 or later.
What is the impact of GHSA-f88m-g3jw-g9cj?
The impact of GHSA-f88m-g3jw-g9cj affects applications using sharp versions prior to 0.35.0 that process untrusted input.
Which package is affected by GHSA-f88m-g3jw-g9cj?
The GHSA-f88m-g3jw-g9cj vulnerability affects the npm package sharp.
What should I do if I cannot upgrade sharp to fix GHSA-f88m-g3jw-g9cj?
If unable to upgrade sharp, consider implementing input validation and restricting the types of input processed as a temporary workaround.