Skip to main content

enshrined/svg-sanitize EUVDEUVD-2026-115867

| CVE-2026-121445 HIGH
Improper Check for Unusual or Exceptional Conditions (CWE-754)
2026-11-03 VulnCheck GHSA-4rvh-48q4-5726
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted SVG to sanitizing endpoint
  2. Exploit
    Trigger super-linear image-set regex backtracking in stripRemoteCssTokens()
  3. Impact
    Exhaust worker CPU or force PCRE failure and fail-open leaving SVG unsanitized

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Unusual condition handling
Exploitation Conditions

Exploitation requires that the consuming application has enabled removeRemoteReferences(true), which routes CSS from <style> elements and style attributes through stripRemoteCssTokens(); without this setting the vulnerable image-set pattern is never reached. The attacker submits an SVG whose CSS contains many unclosed '-webkit-image-set('' tokens: the advisory measured ~7.9s at 30000 repetitions (570 KB) and ~34.7s at 40000 (760 KB) for the <style> form. The fail-open/TypeError (unsanitized content retained) outcome is further gated on (a) PCRE actually hitting its backtrack/JIT limits - the exact threshold varies with the PCRE build, pcre.backtrack_limit and JIT stack size - and (b) a caller that persists the upload and then sanitizes in place. Limiting factors: the style-attribute form fails safe at ~50000 repetitions because the whole attribute is dropped; impact is confined to availability (plus conditional integrity) and requires no authentication per the vendor vector.

Impact

Signals are moderately but not maximally alarming. The vendor CVSS 4.0 vector (8.2) uses AV:N (crafted SVG arrives over the network) with VA:H and VC:N/VI:N, correctly scoping the primary impact to availability only. AC:H/AT:P reflect that the exact failure thresholds depend on the PCRE build, pcre.backtrack_limit and JIT stack size - but the GHSA advisory is explicit that the quadratic time shape itself is deterministic and build-independent, so the CPU-exhaustion effect is reliable even if the precise repetition count is not. No CISA KEV entry and no EPSS score were provided, so there is no evidence of active or widespread exploitation; the vuln.today Decision label is 'this_week' (not act_now/emergency), consistent with a serious but non-emergency DoS. A demonstrated proof-of-concept with measured timings is published in the vendor's own GHSA advisory. Net: this is a real, patch-worthy availability issue for any service sanitizing user SVGs with removeRemoteReferences(true), plus a conditional fail-open (integrity) risk, rather than a mass-exploitation emergency. Note the apparent tension - AV:N implies remote reach, yet exploitation is gated on a specific library configuration and, for the fail-open path, on a specific caller pattern; weight it as config-dependent remote DoS.

Exploit ScenarioDerived

An application that accepts user-supplied SVG uploads and sanitizes them with removeRemoteReferences(true) receives a sub-1MB SVG whose <style> block contains tens of thousands of unclosed -webkit-image-set(' tokens. The greedy image-set regex rescans to end-of-input from every start position, pinning a worker thread for tens of seconds per request (CPU-exhaustion DoS); at higher counts PCRE hits its limits, preg_replace() returns null, and sanitize() throws a TypeError, so a caller that stored the upload first and sanitizes in place is left holding the unsanitized original. A runnable PoC with measured timings is published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 03, 2026

CPU exhaustion in enshrined/svg-sanitize 1.0.0 occurs when removeRemoteReferences(true) is enabled: crafted SVG CSS containing many unclosed -webkit-image-set( tokens drives super-linear regex matching in stripRemoteCssTokens(), holding a PHP worker for tens of seconds. If PCRE hits its backtrack or JIT limits, preg_replace() returns null and sanitize() throws a TypeError instead of failing closed, so an application that stores the upload before sanitizing in place may retain unsanitized content. The vendor advisory includes a proof-of-concept harness; no CISA KEV entry is indicated, and impact is availability-focused with conditional integrity exposure.

RemediationAI

Vendor-released patch: 1.1.0 for composer/enshrined/svg-sanitize; upgrade from 1.0.0 to 1.1.0 and redeploy. If upgrade cannot be immediate, do not enable removeRemoteReferences(true), or disable it where remote-reference stripping is not required, accepting that remote CSS references will no longer be stripped. Also harden callers so a TypeError or a false return from sanitize() is treated as a rejection and the original upload is discarded rather than retained; check preg_replace results with preg_last_error() as the advisory recommends. Advisory: https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-94x8-pw3c-6qcq and VulnCheck: https://www.vulncheck.com/advisories/svg-sanitizer-1.0.0-before-1.1.0-redos-and-fail-open-via-image-set-css-stripping.

Affected VersionsENISA

svg-sanitizer 1.0.0 <1.1.0

Affected Packages

euvd svg_sanitizer fix: 1.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

svg-sanitize is a PHP library that cleans untrusted SVG uploads. With removeRemoteReferences(true), CSS from style elements and style attributes is passed through stripRemoteCssTokens(); the image-set pattern in src/Sanitizer.php has a greedy negated character class before a quote, so many image-set(' tokens without closing parentheses cause each start position to rescan to the end of the CSS, producing super-linear CPU consumption (CWE-1333). A second failure mode is CWE-754: when PCRE reaches backtrack or JIT limits, preg_replace() returns null, stripRemoteCssReferences() passes that null on, and assignment to DOMNode::$textContent, which is typed string, at src/Sanitizer.php:428 throws a TypeError instead of the sanitizer returning false. The trigger requires removeRemoteReferences to be enabled; the style-attribute form was observed to fail safe at high repetition counts, while the style-element form produced the TypeError. The assessed vector is AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, with the primary impact on availability and conditional integrity exposure arising from the fail-open behavior.

Know when Svg Sanitizer gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Remote crafted SVG with no auth or interaction (AV:N/PR:N/UI:N); AC:H because the fail thresholds depend on PCRE build/limits; impact is CPU-exhaustion availability only, so C:N/I:N/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 03, 2026 - 16:17 EUVD
CVE Published
Nov 03, 2026 - 14:28 cve.org
HIGH 8.2

DescriptionCVE.org

darylldoyle svg-sanitizer from 1.0.0 before 1.1.0 contains a regular expression denial of service vulnerability in the image-set pattern of stripRemoteCssTokens() when removeRemoteReferences is enabled. Attackers can submit SVGs with many unclosed image-set tokens to exhaust CPU, or trigger PCRE limits causing sanitize() to throw a TypeError and leave unsanitized content.

Technical POC Analysis

Severity note: the supplied advisory (GHSA-94x8-pw3c-6qcq) self-rates this Moderate 5.9 with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H and its CVE field reads "No known CVE".

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity availability flaw in the widely used enshrined/svg-sanitize PHP library (v1.0.0) can let a crafted SVG file tie up application worker processes for tens of seconds and, under certain failure conditions, allow unsanitized uploads to be stored. Any service accepting SVG uploads and relying on this library for sanitization is exposed to denial-of-service and, potentially, stored-content integrity risk, which warrants leadership attention because it affects customer-facing availability and the trustworthiness of user-generated content.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include disabling removeRemoteReferences(true) where feasible, sanitizing SVG content before it is stored rather than in place, wrapping sanitize() calls to catch and fail closed on null returns or TypeErrors, and enforcing upload size limits, rate limiting, and monitoring of PHP worker saturation on upload endpoints.

Threat Intelligence Overview

Prevalence
Medium
popular PHP SVG-sanitizer library, impact gated on remote-reference stripping
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy