Vulnerability · Published Aug 12, 2025 · Assigned by GitHub_M
CVE-2025-55166svg-sanitizer By-Passing Attribute Sanitization
Medium 5.1
In plain English
A medium-severity cross-site scripting in svg-sanitizer from darylldoyle. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
savg-sanitizer is a PHP SVG/XML sanitizer. Prior to version 0.22.0, the sanitization logic in the cleanXlinkHrefs method only searches for lower-case attribute name, which allows to by-pass the isHrefSafeValue check. As a result this allows cross-site scripting or linking to external domains. This issue has been patched in version 0.22.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | enshrined/svg-sanitize | 0.22.0 | GHSA-22wq-q86m-83fh |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| darylldoyle | svg-sanitizer | < 0.22.0 |
Weakness: CWE-79, CWE-601 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N