Skip to content
OpenAdvisories
High · 8.7 CVE-2026-107378 EUVD-2026-95135GHSA-c3jg-qh8m-j3h2PYSEC-2026-4204

CairoSVG: Quadratic-time DoS parsing a crafted SVG <path>

Published Oct 8, 2026 · Updated Oct 8, 2026 · Assigned by GitHub_M

Description

CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to 2.9.1, rendering an attacker-controlled SVG with a path containing many segments can cause quadratic CPU consumption in cairosvg/path.py. The path tokenizer repeatedly slices and rescans the remaining path data, while draw_markers drains node.vertices with node.vertices.pop(0), causing repeated linear-time work. The svg2png, svg2pdf, and svg2ps APIs reach these operations during ordinary rendering, allowing a sub-megabyte SVG to consume substantial CPU and deny service to a rendering application. This issue is fixed in version 2.9.1.

Affected products

VendorProductAffectedFixed
Kozea CairoSVG < 2.9.1 —

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.

ReleasePackageFixed inAdvisory
Debian 14 cairosvg 2.9.1-1 —
Debian 13 cairosvg No fix yet —
Debian 12 cairosvg No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS cairosvg No fix yet —
Ubuntu 22.04 LTS cairosvg No fix yet —
Ubuntu 20.04 LTS cairosvg No fix yet —
Ubuntu 18.04 LTS cairosvg No fix yet —
Ubuntu 16.04 LTS cairosvg No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP6 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES 15 SP5 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES 15 SP4 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES 3 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-CairoSVG 2.7.1-160000.4.1 SUSE-SU-2026:24596-1
SLES for SAP 15 SP6 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES for SAP 15 SP5 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES for SAP 15 SP4 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLES 16.0 python-CairoSVG 2.7.1-160000.4.1 SUSE-SU-2026:24596-1
SLE HPC 15 SP5 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
SLE HPC 15 SP4 python-CairoSVG 2.7.1-150400.9.9.1 SUSE-SU-2026:4949-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-CairoSVG 2.9.1-1.1 openSUSE-SU-2026:12111-1
openSUSE Leap 16.0 python-CairoSVG 2.7.1-160000.4.1 openSUSE-SU-2026:22182-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI cairosvg < 2.9.1 2.9.1 GHSA-c3jg-qh8m-j3h2

Advisories 4

References