Description
CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to Kozea/CairoSVG has exponential denial of service via recursive <use> element amplification in cairosvg/defs.py. This causes CPU exhaustion from a small input.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Kozea | CairoSVG | < 2.9.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cairosvg | 2.9.0-1 | — |
| Debian 13 | cairosvg | No fix yet | — |
| Debian 12 | cairosvg | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | cairosvg | No fix yet | — |
| Ubuntu 26.04 LTS | cairosvg | No fix yet | — |
| Ubuntu 25.10 | cairosvg | No fix yet | — |
| Ubuntu 24.04 LTS | cairosvg | No fix yet | — |
| Ubuntu 22.04 LTS | cairosvg | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | cairosvg | No fix yet | — |
| Ubuntu 18.04 LTS | cairosvg | No fix yet | — |
| Ubuntu 16.04 LTS | cairosvg | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 3 | python-CairoSVG | 2.7.1-150400.9.6.1 | SUSE-SU-2026:1421-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | python-CairoSVG | 2.7.1-160000.3.1 | SUSE-SU-2026:22024-1 |
| SLES 16.0 | python-CairoSVG | 2.7.1-160000.3.1 | SUSE-SU-2026:22024-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | ansible-creator | 26.8.0-1.1 | openSUSE-SU-2026:11729-1 |
| openSUSE Tumbleweed | python-CairoSVG | 2.9.0-1.1 | openSUSE-SU-2026:10379-1 |
| openSUSE Leap 15.6 | python-CairoSVG | 2.7.1-150400.9.6.1 | SUSE-SU-2026:1421-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-cairosvg | 2.9.0-r0 | — |
| Alpine v3.23 | py3-cairosvg | 2.9.0-r0 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
SnailSploit/CVE-2026-31899 ★ 1 · Mar 15, 2026
CVE-2026-31899: Exponential DoS via Recursive <use> Element Amplification in CairoSVG (CVSS 7.5 High)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | cairosvg | < 2.9.0 | 2.9.0 | GHSA-f38f-5xpm-9r7c |
Advisories 4
- openSUSE-SU-2026:11729-1 ansible-creator-26.8.0-1.1 on GA media SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:22024-1 Security update for python-CairoSVG SUSE / openSUSE Security Updates · Jun 9, 2026
- SUSE-SU-2026:1421-1 Security update for python-CairoSVG SUSE / openSUSE Security Updates · Apr 18, 2026
- openSUSE-SU-2026:10379-1 python311-CairoSVG-2.9.0-1.1 on GA media SUSE / openSUSE Security Updates · Mar 18, 2026