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 im
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
- highfast-xml-parser: Repeated DOCTYPE Declarations Reset Entity Expansion Limits
- high · 7.5CVE-2026-59892CVE-2026-59892: @opentelemetry/propagator-jaeger Denial of Service via Malformed Header
- high · 8.2svgo removeScripts Plugin XSS Bypass via Namespace Prefix and Case-Insensitive URI
- highCVE-2026-59880CVE-2026-59880: immutable Hash-Collision Algorithmic Complexity DoS