Read the docs

Stored XSS via DTD entity collision in enshrined/svg-sanitize

Priority LOW 24CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

The enshrined/svg-sanitize Packagist package before 1.0.0 and the darylldoyle svg-sanitizer before 1.0.0 are affected. The href safety check validates a value after DTD entity expansion, but the output keeps the original entity reference, which HTML rendering later decodes into a javascript: URL (CWE-79). A remote attacker with low privileges can cause script to run in the embedding page's origin when a user activates the link in an SVG that the application embeds inline.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00254 17th percentileScored 2026-11-07
Fix Fixed svg-sanitizer (darylldoyle): 1.0.0enshrined/svg-sanitize (Packagist): 1.0.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
darylldoylesvg-sanitizerbefore 1.0.01.0.0Patch availableCNA
—enshrined/svg-sanitize (Packagist)before 1.0.01.0.0Patch availableGHSA-9rjx-3jch-6vjf
  • svg-sanitizer Vendordarylldoyle Affected before 1.0.0 Fixed in 1.0.0 Patch available CNA
  • enshrined/svg-sanitize (Packagist) Vendor— Affected before 1.0.0 Fixed in 1.0.0 Patch available GHSA-9rjx-3jch-6vjf

Remediation

Upgrade enshrined/svg-sanitize to version 1.0.0. The sources list no fixed version for svg-sanitizer.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA svg-sanitizer (darylldoyle) Fixed in 1.0.0
  • Fix · GHSA-9rjx-3jch-6vjf enshrined/svg-sanitize (Packagist) Fixed in 1.0.0 Advisory →

Timeline

  1. 2026-10-08 Threatist record created from CVE-2026-107380
  2. 2026-10-09 Alias added: GHSA-9rjx-3jch-6vjf
  3. 2026-10-09 Fix available: Packagist/enshrined/[email protected] · GHSA-9rjx-3jch-6vjf
  4. 2026-10-09 CVSS score added · GHSA-9rjx-3jch-6vjf
  5. 2026-10-09 Weakness changed · GHSA-9rjx-3jch-6vjf
  6. 2026-10-09 5 new references · GHSA-9rjx-3jch-6vjf
  7. 2026-10-10 CISA SSVC decision points changed
  8. 2026-10-10 Priority changed: MEDIUM → LOW

References

  • TI-2026-81116 Quadratic CPU exhaustion in svg-sanitizer PHP tag stripping CVSS 4.0HIGH 8.7
  • TI-2026-84327 svg-sanitizer ReDoS and Fail-Open via image-set CSS Stripping CVSS 4.0HIGH 8.2
  • TI-2026-74075 Mixed-case xlink:HrEf bypasses use nesting limit in svg-sanitizer CVSS 3.1MEDIUM 6.5
  • TI-2026-69645 Denial of service in enshrined/svg-sanitize via crafted SVG DTD CVSS 3.1MEDIUM 6.5
  • TI-2026-84328 Incomplete url() filtering in svg-sanitizer allows remote URL requests CVSS 4.0MEDIUM 5.3
  • TI-2026-81115 darylldoyle svg-sanitizer CSS Injection and Remote Reference Bypass CVSS 4.0MEDIUM 5.1
See all 11 →

Sources