CVE-2026-117540

svg-sanitizer before 1.1.0 Quadratic CPU-Exhaustion DoS via PHP-Tag Stripping Loop

Published Oct 27, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

svg-sanitizer before version 1.1.0 performs a costly sanitization routine that repeatedly scans the entire SVG content while removing PHP tags. This loop executes a quadratic number of preg_replace operations for SVG files containing many overlapping PHP tag delimiters, consuming CPU cores for extended periods and effectively disabling the service for legitimate users.

Affected Systems

The vulnerability affects the darylldoyle svg-sanitizer project, specifically releases from 0.5.3 through any pre‑1.1.0 tag. Users running these versions and accepting user‑generated SVG uploads are exposed.

Risk and Exploitability

With a CVSS score of 8.7, the flaw is considered high severity and can be triggered by unauthenticated attackers who supply crafted SVG files. Because the EPSS score is unavailable and the vulnerability is not listed in CISA's KEV catalog, the exploit likelihood is uncertain; however, the lack of authentication and the potentially large impact on service availability make it a significant risk. The attack vector is inferred to be a file upload path that hands SVGs to svg‑sanitizer without additional validation. If exploited, the server could be rendered unresponsive for minutes, allowing the attacker to cause a denial of service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade svg‑sanitizer to version 1.1.0 or later to eliminate the PHP tag stripping loop.
  • If an upgrade is delayed, apply the patch from commit 9ba9001493f5da737759303f13bd965ebdaa778c to correct the loop behavior.
  • Configure the web application to impose strict file size limits and CPU usage quotas on upload requests, reducing the risk of resource exhaustion from malformed SVG files.

Generated by OpenCVE AI on October 27, 2026 at 12:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title svg-sanitizer before 1.1.0 Quadratic CPU-Exhaustion DoS via PHP-Tag Stripping Loop
First Time appeared Svg-sanitizer Project
Svg-sanitizer Project svg-sanitizer
Weaknesses CWE-407
CPEs cpe:2.3:a:svg-sanitizer_project:svg-sanitizer:*:*:*:*:*:*:*:*
Vendors & Products Svg-sanitizer Project
Svg-sanitizer Project svg-sanitizer
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 2, 2026, 7:11 PM
Reserved
Oct 27, 2026, 10:33 AM
Status
Deferred
Published
Oct 27, 2026, 11:17 AM
Modified
Nov 2, 2026, 7:18 PM