Inefficient path parsing in CairoSVG enables denial of service
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-407.
Summary
CairoSVG versions before 2.9.1 are affected. Rendering an SVG whose path contains many segments causes quadratic CPU consumption from inefficient algorithmic complexity (CWE-407). An unauthenticated remote attacker can supply a sub-megabyte SVG to svg2png, svg2pdf or svg2ps, consuming substantial CPU and denying service to the rendering application.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Kozea | CairoSVG | before 2.9.1 | 2.9.1 | Patch available | CNA |
| — | cairosvg (PyPI) | before 2.9.1 | 2.9.1 | Patch available | GHSA-c3jg-qh8m-j3h2 |
- CairoSVG VendorKozea Affected before 2.9.1 Fixed in 2.9.1 Patch available CNA
- cairosvg (PyPI) Vendor— Affected before 2.9.1 Fixed in 2.9.1 Patch available GHSA-c3jg-qh8m-j3h2
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:courtbouillon:cairosvg:*:*:*:*:*:*:*:* | — | — | Courtbouillon |
- cpe:2.3:a:courtbouillon:cairosvg:*:*:*:*:*:*:*:* Versions — — ·Courtbouillon
Remediation
Upgrade the cairosvg package on PyPI to version 2.9.1, the fixed version listed for that package.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA CairoSVG (Kozea) Fixed in 2.9.1
- Fix · GHSA-c3jg-qh8m-j3h2 cairosvg (PyPI) Fixed in 2.9.1 Advisory →
Vendor assessments
Timeline
- 2026-10-08 Threatist record created from CVE-2026-107378
- 2026-10-09 Alias added: GHSA-c3jg-qh8m-j3h2
- 2026-10-09 Fix available: PyPI/[email protected] · GHSA-c3jg-qh8m-j3h2
- 2026-10-09 CVSS score added · GHSA-c3jg-qh8m-j3h2
- 2026-10-09 Weakness changed · GHSA-c3jg-qh8m-j3h2
- 2026-10-09 6 new references · GHSA-c3jg-qh8m-j3h2
- 2026-10-13 Affected versions changed · Red Hat
- 2026-10-13 CVSS score added · Red Hat
References
Other 5
- https://github.com/Kozea/CairoSVG/security/advisories/GHSA-c3jg-qh8m-j3h2
- https://github.com/Kozea/CairoSVG/commit/9d63f049f9988d0ddda3eb94564ac3a50a286523
- https://github.com/Kozea/CairoSVG/commit/a4d585eb374724b79676e9cceaa9e9a1a4358565
- https://github.com/Kozea/CairoSVG/releases/tag/2.9.1
- https://github.com/Kozea/CairoSVG
More Kozea vulnerabilities
- TI-2026-24451 CairoSVG vulnerable to Exponential DoS via recursive <use> element amplification CVSS 3.1HIGH 7.5
- TI-2025-42134 WeasyPrint Vulnerable to Server-Side Request Forgery (SSRF) Protection Bypass via HTTP Redirect CVSS 3.1HIGH 7.5
- TI-2026-36607 WeasyPrint: CSS Injection via Presentational Hints CVSS 3.1MEDIUM 6.5
- TI-2026-39778 WeasyPrint restrictive URL fetcher bypass allows local file read and SSRF CVSS 3.1MEDIUM 6.2
- TI-2023-12296 CairoSVG improperly processes SVG files loaded from external resources CVSS 3.1CRITICAL 9.9
- TI-2026-68895 WeasyPrint passes EPS images to Ghostscript, risking code execution CVSS 3.1HIGH 8.8
Sources
- CVE-2026-107378 · CVE Program
- CVE-2026-107378 · NVD
- FIRST EPSS
- GHSA-c3jg-qh8m-j3h2 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-107378 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences