sharp: Inherited libvips Vulnerabilities in GIF, TIFF, and VIPS Loaders (CVE-2026-33327, CVE-2026-33328, CVE-2026-35590, CVE-2026-35591)
Versions of the sharp Node.js image library before 0.35.0 bundle a vulnerable libvips that can be crashed or exploited by a crafted GIF, TIFF, or VIPS file, putting any app that processes untrusted…
The problem
sharp bundles libvips as a native dependency and inherits all of its vulnerabilities. Four flaws, two rated High under CVSSv4, were found in the libvips loaders for GIF (VipsForeignLoadNsgif), TIFF (VipsForeignLoadTiff), and VIPS (VipsForeignLoadVips).
An attacker who can supply a crafted image file to an application using sharp can trigger the underlying libvips bug. Depending on the specific CVE, impact ranges from process crash (denial of service) to potential memory corruption.
The fix
Upgrade sharp to 0.35.0 or later (currently 0.35.3), which bundles libvips 8.18.3 containing all four fixes. If you use a globally-installed libvips instead of the prebuilt binaries, upgrade it to 8.18.3 separately.
Immediate workaround if you cannot upgrade right now: add the following to your application startup code to block the three vulnerable loaders.
sharp.block({ operation: ["VipsForeignLoadNsgif", "VipsForeignLoadTiff", "VipsForeignLoadVips"] });
Reported by libvips security team.
Related research
- highCVE-2026-84383: sharp Heap Buffer Overflow via Crafted AVIF/HEIC File (libheif RCE)
- criticalNext.js: Unauthenticated Remote Code Execution via AVIF Image Optimization (CVE-2026-84383 / libheif)
- high · 8.2CVE-2026-86039CVE-2026-86039: @libp2p/peer-store Certified Address Poisoning via Forged PeerRecord
- high · 7.5CVE-2026-86038CVE-2026-86038: @libp2p/gossipsub StrictSign RSA Peer ID Author Spoofing