CVE-2026-107378
CVE-2026-107378 · CairoSVG: Quadratic-time DoS parsing a crafted SVG <path>
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
CVSS 8.7 · High · EPSS 0.4% · Fix available
- Published
- Updated
Affected products and versions
cairosvg
- Versions
- < 2.9.1: Affected
No fix published
cairosvg Debian:12
- Versions
- 2.5.2-1.1
- 2.5.2-1.1+deb12u1
- 2.7.0-1
- 2.7.1-1
- 2.7.1-2
- 2.8.2-1
- 2.9.0-1
- 2.9.0-2
- 2.9.1-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Debian:13
- Versions
- 2.7.1-2
- 2.8.2-1
- 2.9.0-1
- 2.9.0-2
- 2.9.1-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Debian:14
- Versions
- 2.7.1-2
- 2.8.2-1
- Affected ranges
- ECOSYSTEM: < 2.9.0-1
Update to 2.9.0-1
cairosvg PyPI
- Versions
- 0.1
- 0.1.1
- 0.1.2
- 0.2
- 0.3
- 0.3.1
- 0.4
- 0.4.1
- 0.4.2
- 0.4.3
- 0.4.4
- 0.5
- 1.0
- 1.0.1
- 1.0.10
- 1.0.11
- 1.0.12
- 1.0.13
- 1.0.14
- 1.0.15
- 1.0.16
- 1.0.17
- 1.0.18
- 1.0.19
- 1.0.2
- 1.0.20
- 1.0.21
- 1.0.22
- 1.0.3
- 1.0.4
- 1.0.5
- 1.0.6
- 1.0.7
- 1.0.8
- 1.0.9
- 2.0.0
- 2.0.0rc1
- 2.0.0rc2
- 2.0.0rc3
- 2.0.0rc4
- 2.0.0rc5
- 2.0.0rc6
- 2.0.1
- 2.0.2
- 2.0.3
- 2.1.0
- 2.1.1
- 2.1.2
- 2.1.3
- 2.2.0
- 2.2.1
- 2.3.0
- 2.3.1
- 2.4.0
- 2.4.1
- 2.4.2
- 2.5.0
- 2.5.1
- 2.5.2
- 2.6.0
- 2.7.0
- 2.7.1
- 2.8.0
- 2.8.1
- 2.8.2
- 2.9.0
- Affected ranges
- ECOSYSTEM: < 2.9.1
Update to 2.9.1
cairosvg Ubuntu:16.04:LTS
- Versions
- 1.0.16-1
- 1.0.17-1
- 1.0.19-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Ubuntu:18.04:LTS
- Versions
- 1.0.20-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Ubuntu:20.04:LTS
- Versions
- 2.4.0-2
- 2.4.2-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Ubuntu:22.04:LTS
- Versions
- 2.5.0-1.1
- 2.5.2-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
cairosvg Ubuntu:24.04:LTS
- Versions
- 2.7.1-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- 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://nvd.nist.gov/vuln/detail/CVE-2026-107378