GHSA-cpvr-w4j5-2mpg

Suggest an improvement
Source
https://github.com/advisories/GHSA-cpvr-w4j5-2mpg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-cpvr-w4j5-2mpg
Aliases
Published
2026-10-22T15:52:48Z
Modified
2026-10-22T16:10:47Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Librsvg: Use-after-free when XML includes have duplicated entities
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-416"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-22T15:52:48Z",
    "nvd_published_at":  "2026-09-23T20:17:27Z",
    "severity":  "HIGH"
}
References

Affected packages

crates.io / librsvg

Package

Name
librsvg
View open source insights on deps.dev
Purl
pkg:cargo/librsvg

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.57.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json"

crates.io / librsvg

Package

Name
librsvg
View open source insights on deps.dev
Purl
pkg:cargo/librsvg

Affected ranges

Type
SEMVER
Events
Introduced
2.60.0-beta.0
Fixed
2.60.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json"

crates.io / librsvg

Package

Name
librsvg
View open source insights on deps.dev
Purl
pkg:cargo/librsvg

Affected ranges

Type
SEMVER
Events
Introduced
2.61.0
Fixed
2.61.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json"

crates.io / librsvg

Package

Name
librsvg
View open source insights on deps.dev
Purl
pkg:cargo/librsvg

Affected ranges

Type
SEMVER
Events
Introduced
2.62.0-beta.0
Fixed
2.62.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json"

crates.io / librsvg

Package

Name
librsvg
View open source insights on deps.dev
Purl
pkg:cargo/librsvg

Affected ranges

Type
SEMVER
Events
Introduced
2.63.0-beta.0
Fixed
2.63.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-cpvr-w4j5-2mpg/GHSA-cpvr-w4j5-2mpg.json"