CVE-2026-31899
HIGH 7.5CVSS 3.1CairoSVG vulnerable to Exponential DoS via recursive <use> element amplification
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.
- Published
- 13 Mar 2026
- Last modified
- 13 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-400CWE-674
- Also known as
- GHSA-f38f-5xpm-9r7cPYSEC-2026-2122
- Sources
- NVDJSONOSV GHSA-f38f-5xpm-9r7cJSONOSV PYSEC-2026-2122JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | courtbouillon | cairosvgcpe:2.3:a:courtbouillon:cairosvg:*:*:*:*:*:*:*:* |
< 2.9.0 | 2.9.0 |
| OSV | PyPI | cairosvg | < 2.9.0 | 2.9.0 |
References
- https://github.com/Kozea/CairoSVG/commit/6dde8685ed3f19837767bce7a13a5491e3d0e0bf · Patch, WEB, FIX
- https://github.com/Kozea/CairoSVG/security/advisories/GHSA-f38f-5xpm-9r7c · Exploit, Mitigation, Vendor Advisory, WEB, EVIDENCE
- https://github.com/Kozea/CairoSVG · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 13 Mar 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Mar 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 13 Mar 2026)