Vulnerability · Published Oct 8, 2026 · Assigned by GitHub_M

CVE-2026-107380enshrined/svg-sanitize: Stored XSS via DTD Entity / HTML5 Named Character Reference Collision

Medium 5.4

In plain English

A medium-severity cross-site scripting in svg-sanitizer from darylldoyle. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)0.3%top 82.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

savg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, svg-sanitizer's isHrefSafeValue() validates an SVG href after XML DTD entity expansion, but saveXML() serializes the original entity reference after removing the DTD declaration. A crafted entity such as Tab can appear to the sanitizer as a safe fragment prefix while HTML5 Named Character Reference resolution during inline HTML rendering later converts the surviving reference to whitespace, exposing a javascript: URL. When an application embeds the sanitized SVG inline, a user who activates the link can cause script to execute in the embedding page's origin. This issue is fixed in version 1.0.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistenshrined/svg-sanitize1.0.0GHSA-9rjx-3jch-6vjf

Affected products (as reported)

VendorProductVersions
darylldoyle svg-sanitizer < 1.0.0

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

References