Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. enshrined/svg-sanitize
  4. ›
  5. CVE-2026-107380

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

October 8, 2026

A crafted SVG bypasses enshrined/svg-sanitize’s href validation and delivers a javascript: URL through the sanitizer unchanged. The bypass exploits a semantic mismatch between XML entity resolution (used during sanitization) and HTML5 Named Character Reference resolution (used by the browser when the SVG is rendered inline).

This is a logic bug in svg-sanitize. It does NOT depend on any PHP ext/dom bug — it works on any PHP version.

Affected installations:

  • enshrined/svg-sanitize: 45.2M Packagist downloads, 1.3M/month, 90+ dependents
  • WordPress Safe SVG plugin: 1M+ active installs (inline SVG rendering via themes)
  • TYPO3, Drupal and 90+ other Packagist dependents

References

  • github.com/advisories/GHSA-9rjx-3jch-6vjf
  • github.com/darylldoyle/svg-sanitizer/commit/23877db7e76f1e1df5c3e65ab30239219c3d2867
  • github.com/darylldoyle/svg-sanitizer/releases/tag/1.0.0
  • github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-9rjx-3jch-6vjf
  • nvd.nist.gov/vuln/detail/CVE-2026-107380

Code Behaviors & Features

Detect and mitigate CVE-2026-107380 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.0.0

Fixed versions

  • 1.0.0

Solution

Upgrade to version 1.0.0 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/enshrined/svg-sanitize/CVE-2026-107380.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:50 +0000.