Findings

CVE-2026-107378

CairoSVG: Quadratic-time DoS parsing a crafted SVG

Published Oct 8, 2026 · corrected/updated Oct 15, 2026 · evidence confidence high

## Summary Rendering an untrusted SVG whose contains many segments is O(n²) CPU. A single under 1 MiB burns tens of seconds. Two independent O(n²) sites in : 1. **Tokenizer** — the path-data parser consumes the string with a loop that repeatedly slices/re-scans the *remaining* string (each step is O(len remaining)), giving O(n²) over the whole attribute. 2. **draw_markers** — marker handling drains with ; is O(n), so draining n vertices is O(n²). Both are hit on a normal render path ( / ), attacker controls only the SVG document. ## PoC (installed cairosvg 2.9.0) | path segments | SVG size | time | |---|---|---| | 50,000 | 244 KB | 1.14 s | | 100,000 | 488 KB | 4.36 s | | 200,000 | ~960 KB | ~18 s | Doubling segments ≈ 4× time ⇒ quadratic. Sub-MiB input ⇒ ~18 s CPU; any service rendering user-supplied SVG (thumbnails, avatars, PDF export) is a DoS target. ## Reachability Public API / / on an untrusted SVG string. ## Suggested fix Tokenize with a single forward scan / index (or ) instead of re-slicing the remainder; drain with an index or instead of . Optionally cap path-segment count.

Grounded briefings

Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.

Executive

CVE-2026-107378 is a high public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.

System administrator

Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: cairosvg (0 → 2.9.1). Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.

Security analyst

Signals on file: EPSS 0.4%. It is not currently listed in the CISA Known Exploited catalog. Weakness classes: CWE-407. Sources contributing to this record: cve_org, epss, github, osv. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.

Exploitation and remediation

  • Exploitation evidence

    Not listed as known exploited in CISA KEV. Not in CISA KEV or VulnCheck KEV.

  • Patch and remediation

    No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.

  • Safe detection guidance

    Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 8, 2026 · GitHub Advisory Database

    Detected

    ## Summary Rendering an untrusted SVG whose contains many segments is O(n²) CPU. A single under 1 MiB burns tens of seconds. Two independent O(n²) sites in : 1. **Tokenizer** — the path-data parser consumes the string with a loop that repeatedly slices/re-scans the *remaining* string (each step is O(len remaining)), giving O(n²) over the whole attribute. 2. **draw_markers** — marker handling drain

  2. Oct 15, 2026 · GitHub Advisory Database

    Fix available

    cairosvg fixed in 2.9.1

  3. Oct 15, 2026 · GitHub Advisory Database

    Fix available

    cairosvg fixed in 2.9.1

  4. Oct 15, 2026 · GitHub Advisory Database

    Updated

    ## Summary Rendering an untrusted SVG whose contains many segments is O(n²) CPU. A single under 1 MiB burns tens of seconds. Two independent O(n²) sites in : 1. **Tokenizer** — the path-data parser consumes the string with a loop that repeatedly slices/re-scans the *remaining* string (each step is O(len remaining)), giving O(n²) over the whole attribute. 2. **draw_markers** — marker handling drain

Affected

  • PyPI cairosvg0 → 2.9.1

Sources

References