Skip to content
OpenAdvisories
Medium · 5.7 CVE-2021-21236 EUVD-2021-0039GHSA-hq37-853p-g5cfPYSEC-2021-5

Regular Expression Denial of Service in CairoSVG

Published Jan 6, 2021 · Updated Aug 3, 2024 · Assigned by GitHub_M

Description

CairoSVG is a Python (pypi) package. CairoSVG is an SVG converter based on Cairo. In CairoSVG before version 2.5.1, there is a regular expression denial of service (REDoS) vulnerability. When processing SVG files, the python package CairoSVG uses two regular expressions which are vulnerable to Regular Expression Denial of Service (REDoS). If an attacker provides a malicious SVG, it can make cairosvg get stuck processing the file for a very long time. This is fixed in version 2.5.1. See Referenced GitHub advisory for more information.

Affected products

VendorProductAffectedFixed
Kozea CairoSVG < 2.5.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.5.0-1.1 —
Debian 13 cairosvg 2.5.0-1.1 —
Debian 12 cairosvg 2.5.0-1.1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 cairosvg No fix yet —
Ubuntu 25.10 cairosvg No fix yet —
Ubuntu 20.04 LTS cairosvg No fix yet —
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP5 python-CairoSVG 2.5.2-bp155.3.3.1 openSUSE-SU-2023:0260-1
SUSE Package Hub 15 SP4 python-CairoSVG 2.5.2-bp154.2.3.1 openSUSE-SU-2023:0272-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-CairoSVG 2.9.0-1.3 openSUSE-SU-2026:11989-1
openSUSE Leap 15.5 python-CairoSVG 2.5.2-bp155.3.3.1 openSUSE-SU-2023:0260-1
openSUSE Leap 15.4 python-CairoSVG 2.5.2-bp154.2.3.1 openSUSE-SU-2023:0272-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-cairosvg 2.5.1-r0 —
Alpine v3.23 py3-cairosvg 2.5.1-r0 —
Alpine v3.22 py3-cairosvg 2.5.1-r0 —
Alpine v3.21 py3-cairosvg 2.5.1-r0 —
Alpine v3.20 py3-cairosvg 2.5.1-r0 —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 py3-cairosvg 2.5.1-r0 —
Alpine v3.18 py3-cairosvg 2.5.1-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI cairosvg < 2.5.1 2.5.1 GHSA-hq37-853p-g5cf

Advisories 3

References