CVE-2026-117540Published Oct 27, 2026 · Oct 27Updated Nov 4
svg-sanitizer denial of service in PHP tag stripping
darylldoyle svg-sanitizer
High8.7Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| darylldoyle svg-sanitizer |
|
|
Original description
svg-sanitizer from 0.5.3 before 1.1.0 contains a denial of service vulnerability in Sanitizer::sanitize() that repeatedly rescans the whole input while stripping PHP tags. Unauthenticated attackers can upload SVGs with many overlapping PHP tag openers and closers, forcing quadratic preg_replace passes that exhaust worker CPU for minutes.
From the CVE record · VulnCheck
References
- github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-2v7c-jx29-jprpExploit
- github.com/darylldoyle/svg-sanitizer/commit/9ba9001493f5da737759303f13bd965ebdaa778cPatch
- vulncheck.com/advisories/svg-sanitizer-before-1.1.0-quadratic-cpu-exhaustion-dos-via-php-tag-stripping-loop
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/117xxx/CVE-2026-117540.json
- nvd.nist.gov/vuln/detail/CVE-2026-117540