svg-sanitizer By-Passing Attribute Sanitization
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Spoofing, Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-601 and CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- 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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| darylldoyle | svg-sanitizer | before 0.22.0 | 0.22.0 | Patch available | CNA |
| — | enshrined/svg-sanitize (Packagist) | before 0.22.0 | 0.22.0 | Patch available | GHSA-22wq-q86m-83fh |
- svg-sanitizer Vendordarylldoyle Affected before 0.22.0 Fixed in 0.22.0 Patch available CNA
- enshrined/svg-sanitize (Packagist) Vendor— Affected before 0.22.0 Fixed in 0.22.0 Patch available GHSA-22wq-q86m-83fh
Remediation
- Fix · CNA svg-sanitizer (darylldoyle) Fixed in 0.22.0
- Fix · GHSA-22wq-q86m-83fh enshrined/svg-sanitize (Packagist) Fixed in 0.22.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-55166
- 2026-10-03 Alias added: GHSA-22wq-q86m-83fh
References
Other 6
- https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-22wq-q86m-83fh
- https://github.com/darylldoyle/svg-sanitizer/commit/5a0a1eaf0c6b0b540dc945fe30c93cf106b357c1
- https://github.com/darylldoyle/svg-sanitizer/commit/0afa95ea74be155a7bcd6c6fb60c276c39984500
- https://github.com/darylldoyle/svg-sanitizer
- https://github.com/darylldoyle/svg-sanitizer/blob/0.21.0/src/Sanitizer.php#L454-L481
- https://github.com/darylldoyle/svg-sanitizer/releases/tag/0.22.0
More darylldoyle vulnerabilities
- 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
Sources
- CVE-2025-55166 · CVE Program
- CVE-2025-55166 · NVD
- FIRST EPSS
- GHSA-22wq-q86m-83fh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences