# CVE-2026-31899: CairoSVG vulnerable to Exponential DoS via recursive <use> element amplification

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-13T18:57:31.000Z
- Modified: 2026-07-13T07:26:50.032Z
- Also known as: GHSA-f38f-5xpm-9r7c, PYSEC-2026-2122
- Weaknesses: CWE-400, CWE-674
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Kozea CairoSVG: < 2.9.0
- cairosvg (PyPI): before 2.9.0
- courtbouillon cairosvg: before 2.9.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/Kozea/CairoSVG/security/advisories/GHSA-f38f-5xpm-9r7c> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://github.com/Kozea/CairoSVG/commit/6dde8685ed3f19837767bce7a13a5491e3d0e0bf> (fix, patch, web)
- <https://github.com/Kozea/CairoSVG> (package)

## Sources

- CVE List: [CVE-2026-31899](https://www.cve.org/CVERecord?id=CVE-2026-31899), CVE Terms of Use, modified 2026-03-16
- GitHub Advisory Database: [GHSA-f38f-5xpm-9r7c](https://github.com/advisories/GHSA-f38f-5xpm-9r7c), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-31899](https://nvd.nist.gov/vuln/detail/CVE-2026-31899), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2122](https://osv.dev/vulnerability/PYSEC-2026-2122), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-31899 · Whole record: https://cve.day/CVE-2026-31899.json · Rebuilt by cve.day 2026-11-25T22:59:15.887Z
