Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted SVG to renderer
-
ExploitPath with many segments parsed
-
ExecutionQuadratic tokenizer/vertex processing
-
ImpactCPU exhaustion denies service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that the target application render attacker-controlled or untrusted SVG input through CairoSVG's svg2png, svg2pdf, or svg2ps APIs on a version prior to 2.9.1; the malicious SVG must contain a path element with a large number of segments to trigger the quadratic tokenizer and the node.vertices.pop(0) draining. No authentication, user interaction, or special configuration is needed (PR:N/UI:N), and the payload can be under one megabyte. The practical limiting factor is exposure: deployments that render only trusted, developer-authored SVGs are not meaningfully at risk, while any service accepting user-uploaded SVGs for conversion is directly exposed. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a network-reachable, low-complexity, unauthenticated attack requiring no user interaction, with impact confined entirely to availability (VA:H; VC:N/VI:N) - a pure denial-of-service via algorithmic complexity (CWE-407). The base score of 8.7 is driven solely by the ease of reaching the vulnerable code (svg2png/svg2pdf/svg2ps during ordinary rendering) combined with total availability impact, not by any data compromise. No EPSS score, CISA KEV listing, SSVC decision, or public exploit was provided, so there is no evidence of active exploitation or widespread weaponization; this is a high-severity-by-ease issue rather than a confirmed in-the-wild priority. The quadratic behavior is well-documented by the vendor's own fix commits, so the defect is confirmed, but real-world risk depends heavily on whether a given deployment renders untrusted, attacker-supplied SVG input. Note one conflict: the single 'Information Disclosure' tag directly contradicts the CVSS impact metrics (VC:N/VI:N, VA:H) and the DoS description - treat the DoS/availability framing as authoritative. |
| Exploit ScenarioDerived | An application that uses CairoSVG to render user-supplied SVGs (e.g., a document-conversion or thumbnail service) accepts a crafted sub-megabyte SVG containing a path with a very large number of segments. When svg2png/svg2pdf/svg2ps processes it, the path tokenizer's repeated slicing/rescanning and the pop(0) draining of node.vertices trigger quadratic CPU consumption, pinning a core and denying service to legitimate requests. No public exploit code was identified, but the trivial input requirements and vendor-documented root cause make reproduction straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
CPU exhaustion during SVG rendering in CairoSVG versions prior to 2.9.1 lets an unauthenticated remote attacker deny service to any application that converts untrusted SVG input. A path element containing a large number of segments drives quadratic (O(n²)) work in cairosvg/path.py, where the tokenizer repeatedly slices and rescans the remaining path data and draw_markers drains node.vertices with pop(0); a payload well under one megabyte is sufficient to consume substantial CPU. The svg2png, svg2pdf, and svg2ps APIs all reach the vulnerable code during ordinary rendering, and the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N, VA:H with VC:N/VI:N) confirms this is a pure availability impact requiring no authentication or user interaction; no public exploit code has been identified at time of analysis. Risk is therefore concentrated in services that render user-supplied SVGs, while deployments that only process trusted, developer-authored SVG files are not meaningfully exposed.
RemediationAI
Vendor-released patch: upgrade to CairoSVG 2.9.1 or later, available from the release page at https://github.com/Kozea/CairoSVG/releases/tag/2.9.1, which incorporates the tokenizer and marker-draining fixes in the linked upstream commits and is the only complete remedy. Until the upgrade can be deployed, treat every untrusted SVG as hostile input: enforce a hard size cap and a segment-count cap in your own pre-parse validation of the 'd' attribute (reject paths with abnormally many segments) - effective but bypassable if the parser is reached through other code paths; run each conversion in an isolated worker process or container with a strict CPU-time and memory timeout, then kill and discard the worker on expiry, which contains the blast radius but adds process-management overhead and still consumes a worker slot per slow request; and rate-limit or queue SVG conversion endpoints so a single abusive request cannot exhaust the render pool. For deployments that only ever render trusted, developer-authored SVGs, the practical exposure is negligible, so prioritization can be based on whether user-supplied SVG reaches the svg2png, svg2pdf, or svg2ps APIs. Consult GitHub advisory GHSA-c3jg-qh8m-j3h2 for the authoritative vendor guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-407 (Inefficient Algorithmic Complexity) in CairoSVG's path parser. In cairosvg/path.py, the path() routine tokenized the SVG path 'd' attribute by repeatedly splitting the front off the remaining string and re-scanning it, so the cost of parsing grew with the square of the number of path segments. A second quadratic hot spot exists in draw_markers, which removes vertices one at a time using node.vertices.pop(0) - each pop shifts the entire remaining list, making marker drawing linear per element and quadratic overall. Both code paths are exercised by ordinary rendering, meaning any CairoSVG-based conversion pipeline (the svg2png, svg2pdf, and svg2ps entry points) triggers them without special options. The upstream fix replaces the ad-hoc string slicing with a single regular-expression pass (re.finditer over a PATH_LETTERS pattern) and stores the resulting tokens in a deque that supports O(1) popleft/appendleft, eliminating the repeated rescans. The fix landed in two commits referenced by the advisory. Note that one source tagged this record as 'Information Disclosure', which conflicts with the description and the independent assessment: the weakness is algorithmic denial of service with no confidentiality or integrity impact (VC:N/VI:N/SC:N/SI:N), so that tag should not be relied upon.
Know when the next one hits your stack
- 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
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
Untrusted SVG reaches rendering APIs with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is availability-only CPU exhaustion, so C:N/I:N/A:H.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to 2.9.1, rendering an attacker-controlled SVG with a path containing many segments can cause quadratic CPU consumption in cairosvg/path.py. The path tokenizer repeatedly slices and rescans the remaining path data, while draw_markers drains node.vertices with node.vertices.pop(0), causing repeated linear-time work. The svg2png, svg2pdf, and svg2ps APIs reach these operations during ordinary rendering, allowing a sub-megabyte SVG to consume substantial CPU and deny service to a rendering application. This issue is fixed in version 2.9.1.
Blast Radius
ecosystem impact- 594 pypi packages depend on cairosvg (406 direct, 192 indirect)
Ecosystem-wide dependent count for version 2.9.1.
Technical POC Analysis
Bug class: inefficient algorithmic complexity (CWE-407) - quadratic CPU in cairosvg/path.py.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CairoSVG, a library for converting SVG images, contains a high-severity CPU exhaustion vulnerability that allows unauthenticated attackers to cause denial of service by submitting crafted SVG files with numerous path segments. This affects any application or service that renders user-supplied SVG content, such as web applications, document converters, or image processing pipelines, potentially leading to service outages and degraded performance. No public exploit identified at time of analysis, but organizations with internet-facing SVG rendering should act promptly as no vendor-released patch is currently available.
Input validation to reject SVGs with excessive path segments, rate limiting, CPU quotas per conversion, WAF rules to detect malicious SVG patterns, sandboxing the rendering process with limited resources, and monitoring for CPU exhaustion.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-95135
GHSA-c3jg-qh8m-j3h2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB