CVE-2026-96889: Use-after-free in librsvg nested XInclude entity handling
CVE-2026-96889, also tracked as RUSTSEC-2026-0305, is a use-after-free vulnerability in librsvg's processing of SVG documents containing nested XInclude operations and duplicate XML entity declarations. During recursive parsing, an entity replacement in the shared XmlState entity map frees an xmlEntity object that the outer libxml2 parser still uses. Subsequent access to the freed object causes memory corruption, potentially resulting in application crashes or arbitrary code execution. Applications using vulnerable bundled librsvg dependencies, including affected sharp installations, are also exposed.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Processing a crafted SVG can crash the consuming application, causing denial of service, and may permit arbitrary code execution with the privileges of the consuming process. Potential consequences include loss of confidentiality, integrity, and availability within that process's security context. Code execution is not established for every deployment; sharp advisories identify runtime-dependent exploitation conditions on glibc-based Linux. The assigned CVSS v3.0 base score is 7.8.
Mitigation
If you can’t patch tonight, do this now.
Until patched, prevent untrusted SVG documents from reaching vulnerable librsvg decoders. In sharp applications, disable SVG decoding with sharp.block({ operation: ["VipsForeignLoadSvg"] });. The sharp advisory also recommends a Node.js executable compiled as a Position Independent Executable (PIE) to mitigate the described code-execution path; it notes that most Linux package-manager builds provide PIE hardening, whereas official Node.js binaries do not. PIE hardening does not repair the underlying use-after-free or establish protection against denial of service.
Remediation
Patch, then assume compromise.
Upgrade librsvg to the fixed release for the applicable branch: 2.57.5, 2.60.3, 2.61.5, 2.62.4, or 2.63.2, or a later fixed release. The fix prevents premature freeing of XML entities still referenced by libxml2. For sharp-provided prebuilt binaries, upgrade sharp to 0.35.5 or later; 0.35.5 bundles librsvg 2.63.2. For sharp using a globally installed librsvg, upgrade that dependency to 2.63.2 or later. Distribution backports include Debian trixie 2.60.0+dfsg-1+deb13u1, Ubuntu 26.04 LTS 2.61.3+dfsg-3ubuntu0.1, Ubuntu 24.04 LTS 2.58.0+dfsg-1ubuntu0.1, and RHEL 9 2.50.7-3.el9_9.1. Apply the applicable vendor security updates to other affected packages, including glycin-loaders where it incorporates vulnerable librsvg code.
Exploits
2 exploits validated by Mallory's analysis. Hidden: 7 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.
References
Frequently asked questions
- Is CVE-2026-96889 exploited in the wild?
- As of Nov 17, 2026, Mallory has no reports of CVE-2026-96889 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-96889?
- Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2026-96889, the earliest disclosed Sep 21, 2026.
- Is there a patch for CVE-2026-96889?
- Upgrade librsvg to the fixed release for the applicable branch: 2.57.5, 2.60.3, 2.61.5, 2.62.4, or 2.63.2, or a later fixed release. The fix prevents premature freeing of XML entities still referenced by libxml2.
- How severe is CVE-2026-96889?
- CVE-2026-96889 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 0.56% (47th percentile) as of Nov 17, 2026.
Recent activity
87 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.