Resource exhaustion in CairoSVG - CVE-2026-31899

 

Resource exhaustion in CairoSVG - CVE-2026-31899

Published: April 24, 2026


Vulnerability identifier: #VU127613
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-31899
CWE-ID: CWE-400
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Kozea
Affected software:
CairoSVG

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to uncontrolled resource consumption in the use() function in cairosvg/defs.py when processing crafted SVG input with recursively nested elements. A remote attacker can send a specially crafted SVG file or document to cause a denial of service.

A small input can trigger exponential rendering amplification and sustained CPU exhaustion without significant memory growth.


How to mitigate CVE-2026-31899

Install security update from vendor's website.

Sources