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.
Published: 2026-10-27
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

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.

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

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 yet.

History

Tue, 27 Oct 2026 11:15:00 +0000

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'}


Subscriptions

Svg-sanitizer Project Svg-sanitizer
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-27T10:59:34.119Z

Reserved: 2026-10-27T10:33:39.046Z

Link: CVE-2026-117540

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-27T11:17:34.833

Modified: 2026-10-27T11:17:34.953

Link: CVE-2026-117540

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-27T12:30:02Z

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity