Inefficient Algorithmic Complexity in CairoSVG - CVE-2026-107378

 

Inefficient Algorithmic Complexity in CairoSVG - CVE-2026-107378

Published: November 11, 2026


Vulnerability identifier: #VU165871
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-107378
CWE-ID: CWE-407
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service through excessive CPU consumption in services rendering untrusted SVG documents.

The vulnerability exists due to quadratic-time processing in cairosvg/path.py when tokenizing path data by repeatedly slicing and rescanning the remaining string and draining marker vertices using list.pop(0). A remote attacker can submit a crafted SVG containing a path with many segments for rendering through svg2png, svg2pdf, or svg2ps to exhaust CPU resources and degrade service availability.


Affected software

CairoSVG

How to mitigate CVE-2026-107378

Install security update from vendor's website.

CairoSVG - update to 2.9.1

External References