---
id: CVE-2026-117540
title: >-
  svg-sanitizer before 1.1.0 Quadratic CPU-Exhaustion DoS via PHP-Tag Stripping
  Loop
summary: >-
  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 P…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-407
vendor: darylldoyle
product: svg-sanitizer
affected:
  - svg-sanitizer >= 0.5.3 < 1.1.0
published: '2026-10-27'
updated: '2026-10-27'
sourceUpdated: '2026-10-27T10:59:34.119Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-117540'
references:
  - url: >-
      https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-2v7c-jx29-jprp
    label: GitHub Security Advisory (GHSA-2v7c-jx29-jprp)
  - url: >-
      https://github.com/darylldoyle/svg-sanitizer/commit/9ba9001493f5da737759303f13bd965ebdaa778c
  - url: >-
      https://www.vulncheck.com/advisories/svg-sanitizer-before-1.1.0-quadratic-cpu-exhaustion-dos-via-php-tag-stripping-loop
    label: >-
      VulnCheck Advisory: svg-sanitizer before 1.1.0 Quadratic CPU-Exhaustion
      DoS via PHP-Tag Stripping Loop
tags:
  - cve.org
ingestedAt: '2026-10-27T16:11:59.298Z'
---

## Overview

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.

## Affected

- `svg-sanitizer >= 0.5.3 < 1.1.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
