{"id":"CVE-2026-96889","kind":"vulnerability","aliases":["CVE-2026-96889","GHSA-cpvr-w4j5-2mpg"],"related":[],"title":"Librsvg: Use-after-free when XML includes have duplicated entities","description":"Librsvg uses libxml2, a C library, to parse XML.  When librsvg parses\nan SVG document which has a nested Xinclude, an XML entity declaration\nwith a duplicate name as an existing one can cause a use-after-free error.\n\nWhile libxml2 is expanding an internal entity, a recursive XInclude\ncan parse another document that declares an entity with the same\nname. Both parses use the same `XmlState` entity\nmap on the librsvg side. `entity_insert()` replaces the first entry, whose `Drop`\nimplementation calls `xmlFreeNode()`. The outer `xmlCtxtParseEntity()`\nthen keeps using the freed 144-byte `xmlEntity`.\n\nThe included parse should not free an entity that the outer parser is still using.\n\nThe fix is in commit 8a1b0cd319e9af2d1e9cf878081dd77f227a0504, where\nlibrsvg will no longer free xmlEntity pointers that libxml2 is still\nusing.","summary":"librsvg, the SVG rendering library, can use freed memory when an SVG file contains a nested XInclude that declares an entity with a duplicate name. An attacker who supplies a crafted SVG to an app that renders it could crash the process or potentially run code.","severity":"high","cvss":7.800000190734863,"epss":0.0020000000949949026,"exploited":false,"exploited_at":null,"products":[{"name":"librsvg","fixed":["2.57.5"],"affected":"< 2.57.5","ecosystem":"cargo"},{"name":"librsvg","fixed":["2.60.3"],"affected":">= 2.60.0-beta.0, < 2.60.3","ecosystem":"cargo"},{"name":"librsvg","fixed":["2.61.5"],"affected":">= 2.61.0, < 2.61.5","ecosystem":"cargo"},{"name":"librsvg","fixed":["2.62.4"],"affected":">= 2.62.0-beta.0, < 2.62.4","ecosystem":"cargo"},{"name":"librsvg","fixed":["2.63.2"],"affected":">= 2.63.0-beta.0, < 2.63.2","ecosystem":"cargo"}],"ecosystems":["cargo"],"tags":["cwe-416","librsvg","package","rust","self-hosted","svg-rendering"],"not_affected_if":["librsvg-below-affected-range","svg-not-parsed-from-untrusted-input"],"how_to_check":"Run `cargo tree -i librsvg` or check Cargo.lock for librsvg and compare its version to the affected ranges.","fix":"Upgrade librsvg to 2.57.5, 2.60.3, 2.61.5, 2.62.4, 2.63.2 or later, matching your release line.","status":"open","published_at":"2026-09-23T20:17:27+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T19:52:50+00:00","updated_at":"2026-10-23T23:44:52+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T19:52:50Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade librsvg to 2.57.5, 2.60.3, 2.61.5, 2.62.4, 2.63.2 or later, matching your release line.\nunknown","summary":"librsvg, the SVG rendering library, can use freed memory when an SVG file contains a nested XInclude that declares an entity with a duplicate name. An attacker who supplies a crafted SVG to an app that renders it could crash the process or potentially run code.","category":"package","who_cares":["rust","librsvg","svg-rendering","self-hosted"],"confidence":0.8,"analyst_note":"","how_to_check":"Run `cargo tree -i librsvg` or check Cargo.lock for librsvg and compare its version to the affected ranges.\nunknown\nunknown","needs_analyst":false,"not_affected_if":["librsvg-below-affected-range","svg-not-parsed-from-untrusted-input"],"severity_if_unknown":"high"},"cost_usd":0.00041,"input_tokens":2450,"output_tokens":329,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,21A '-416':29B '-96889':14A,22A '144':178C '2mpg':19A '8a1b0cd319e9af2d1e9cf878081dd77f227a0504':201C 'anoth':137C 'app':73B 'attack':65B 'byte':179C 'c':89C 'call':168C 'caus':118C 'code':84B 'commit':200C 'contain':52B 'could':77B 'cpvr':17A 'craft':69B 'crash':78B 'cve':12A,20A 'cwe':28B 'declar':57B,108C,140C 'document':99C,138C 'drop':166C 'duplic':10A,62B,111C 'entiti':11A,59B,107C,131C,142C,153C,159C,188C 'entri':164C 'error':124C 'exist':115C 'expand':128C 'file':51B 'first':163C 'fix':197C 'free':5A,123C,186C,207C 'freed':46B,177C 'ghsa':16A 'ghsa-cpvr-w4j5-2mpg':15A 'host':35B 'implement':167C 'includ':8A,182C 'insert':160C 'intern':130C 'keep':174C 'librari':43B,90C 'librsvg':1A,23A,24A,25A,26A,27A,30B,39B,85C,95C,157C,203C 'libxml2':87C,126C,211C 'longer':206C 'map':154C 'memori':47B 'name':63B,112C,146C 'nest':54B,103C 'one':116C 'outer':171C,191C 'packag':31B 'pars':92C,96C,136C,148C,183C 'parser':192C 'pointer':209C 'potenti':82B 'process':80B 'recurs':133C 'render':38B,42B,75B 'replac':161C 'run':83B 'rust':32B 'self':34B 'self-host':33B 'side':158C 'still':194C,213C 'suppli':67B 'svg':37B,41B,50B,70B,98C 'svg-render':36B 'use':3A,45B,86C,121C,149C,175C,195C,214C 'use-after-fre':2A,120C 'w4j5':18A 'whose':165C 'xinclud':55B,104C,134C 'xml':7A,93C,106C 'xmlctxtparseent':172C 'xmlentiti':180C,208C 'xmlfreenod':169C 'xmlstate':152C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-09-23T20:17:27+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-cpvr-w4j5-2mpg","url":"https://github.com/advisories/GHSA-cpvr-w4j5-2mpg","severity":"high","published_at":"2026-10-22T15:52:48+00:00","modified_at":"2026-10-22T15:52:50+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-96889","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-96889","severity":null,"published_at":"2026-09-23T20:17:27+00:00","modified_at":"2026-10-21T17:20:52+00:00","first_seen_at":"2026-10-23T23:44:52+00:00","fetched_at":"2026-10-23T23:44:52+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}