CVE-2026-96889: Librsvg: use-after-free when xml includes have duplicated entities

Published Sep 23, 2026
·
Updated

A flaw was found in librsvg. When processing an SVG document containing nested XML inclusions (Xincludes) with duplicate entity declarations, a use-after-free error can occur. This vulnerability arises because the library incorrectly frees an XML entity that is still in use by the parser. An attacker could potentially exploit this to cause a denial of service or execute arbitrary code.

Other sources

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. entityinsert() 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.

Red Hat

Affected Software

1 affected component
Gnome librsvg

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade librsvg to a version that resolves this vulnerability.

    Patch 8a1b0cd319e9af2d1e9cf878081dd77f227a0504

Event History

Sep 23, 2026
Data Sourced
via Red Hat·09:29 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·07:40 PM
Data Sourced
via MITRE·07:40 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What level of access does an attacker need to exploit this issue?

The attack vector is local and requires user interaction, but it does not require attacker privileges. Exploitation depends on getting a user or local process to parse a crafted SVG document.

2

What characteristics must a malicious SVG have?

The SVG must trigger nested XInclude processing and use duplicate XML entity declarations. The duplicate declaration occurs in an included document while an outer parse is expanding an entity with the same name.

3

How can I determine whether a fix is present?

The described fix is in librsvg commit 8a1b0cd319e9af2d1e9cf878081dd77f227a0504. No fixed release version is provided in the available data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203