high · 7.8 Patched

Librsvg: Use-after-free when XML includes have duplicated entities

CVE-2026-96889 · GHSA-cpvr-w4j5-2mpg · RUSTSEC-2026-0305 · published 23 Sept 2026

How serious is it

  • Severity: high, CVSS score 7.8 out of 10.
  • No exploit prediction (EPSS) score yet.
  • Not on the CISA list of exploited vulnerabilities.
  • No public exploit in Exploit-DB.

Is your app affected by CVE-2026-96889?

Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.

Who is affected

  • librsvg (crates.io) < 2.57.5
  • librsvg (crates.io) >= 2.60.0-beta.0, < 2.60.3
  • librsvg (crates.io) >= 2.61.0, < 2.61.5
  • librsvg (crates.io) >= 2.62.0-beta.0, < 2.62.4
  • librsvg (crates.io) >= 2.63.0-beta.0, < 2.63.2

How to check

  1. Run cargo tree -i librsvg in your project to see the installed version, including copies pulled in by other packages.
  2. Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.

How to fix

Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
  1. On < 2.57.5: Upgrade librsvg to 2.57.5 or later, commit the lockfile and redeploy.
  2. On >= 2.60.0-beta.0, < 2.60.3: Upgrade librsvg to 2.60.3 or later, commit the lockfile and redeploy.
  3. On >= 2.61.0, < 2.61.5: Upgrade librsvg to 2.61.5 or later, commit the lockfile and redeploy.
  4. On >= 2.62.0-beta.0, < 2.62.4: Upgrade librsvg to 2.62.4 or later, commit the lockfile and redeploy.
  5. On >= 2.63.0-beta.0, < 2.63.2: Upgrade librsvg to 2.63.2 or later, commit the lockfile and redeploy.
  6. If a vulnerable version was live, check your logs and rotate the secrets that server could read.

The advisory

Librsvg uses libxml2, a C library, to parse XML. When librsvg parses an SVG document which has a nested Xinclude, an XML entity declaration with a duplicate name as an existing one can cause a use-after-free error. While libxml2 is expanding an internal entity, a recursive XInclude can parse another document that declares an entity with the same name. Both parses use the same `XmlState` entity map on the librsvg side. `entity_insert()` replaces the first entry, whose `Drop` implementation calls `xmlFreeNode()`. The outer `xmlCtxtParseEntity()` then keeps using the freed 144-byte `xmlEntity`. The included parse should not free an entity that the outer parser is still using. The fix is in commit 8a1b0cd319e9af2d1e9cf878081dd77f227a0504, where librsvg will no longer free xmlEntity pointers that libxml2 is still using.

Check your whole app

Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.

References

Merged from CVE List, GitHub Advisory Database, OSV. Last updated 26 Oct 2026. All vulnerabilities · RSS · JSON