sharp: Use-after-free in bundled librsvg allows code execution
Summary
The Node.js image library sharp before 0.35.5 bundles librsvg, which contains a memory-related use-after-free flaw (CVE-2026-96889, CWE-416). If sharp decodes a crafted SVG image, an attacker may execute arbitrary code under certain runtime-specific conditions on glibc-based Linux. No authentication or user interaction is required, but the attacker must get an SVG image to sharp, for example through an upload or resize feature.
Affected
- sharp versions before 0.35.5 (npm package sharp)
- Bundled librsvg dependency (CVE-2026-96889)
Fixed in
- sharp 0.35.5 or later (includes librsvg 2.63.2)
- Globally installed librsvg: 2.63.2 or later (GNOME security releases 2.57.5 and 2.61.5 also exist)
- Linux distributions: check your vendor's librsvg update, as fix versions were not verified for all distributions
Workaround
- Stop sharp from decoding SVG images, as stated in the vendor advisory: sharp.block({ operation: ["VipsForeignLoadSvg"] });
- Reject SVG uploads before they reach the image processing pipeline.
- Use a Position Independent Executable (PIE) Node.js binary to reduce RCE risk; the official Node.js binaries are not PIE.
Exploitation
- No known exploitation in the wild found at the time of research; CISA KEV was not verified.
- CISA SSVC assessment: Exploitation none, Automatable no, Technical Impact total.
- No public proof of concept found.
Our recommendation
- Inventory all sharp installations, including transitive dependencies and container images (for example with npm ls sharp).
- Upgrade to sharp 0.35.5 or later and rebuild containers.
- If the application processes user-supplied SVG files, block SVG until the update is applied.
- Monitor for a CISA KEV listing and vendor updates.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-wq5f-xc86-pv6w (lovell/sharp) github.com
- VulnCheck advisory: Sharp before 0.35.5 RCE via librsvg dependency www.vulncheck.com
- GNOME librsvg release 2.61.5 github.com
- GNOME librsvg release 2.57.5 github.com
- SentinelOne vulnerability database: CVE-2026-96889 www.sentinelone.com
- GitLab advisory mirror GHSA-wq5f-xc86-pv6w advisories.gitlab.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 08:27.
Original description (NVD)
sharp before 0.35.5 bundles a librsvg dependency affected by a memory-related vulnerability (CVE-2026-96889) that, under certain runtime-specific conditions, can lead to code execution on glibc-based Linux. An attacker can supply a crafted SVG image that, when decoded by sharp through librsvg, may result in arbitrary code execution.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
