CVEfocus › CVE database › CVE-2021-21236

CVE-2021-21236Regular Expression Denial of Service in CairoSVG

CVSS 5.7 MediumEPSS 1.4% (higher than 72% of CVEs)Published 2021-01-06Updated 2024-08-03Assigner: GitHub_M

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.

CWE-400

What to do

Fixed builds are available from Alpine, Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

11Fixed
2Fix pending
3Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10cairosvgFix pendingUBUNTU-CVE-2021-21236
Ubuntu 26.04cairosvgNot affected
vulnerable_code_not_present
Ubuntu 25.10cairosvgWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-21236
Ubuntu 24.04cairosvgNot affected
vulnerable_code_not_present
Ubuntu 20.04cairosvgFix pendingUBUNTU-CVE-2021-21236
Ubuntu 16.04cairosvgWill not fix
Ubuntu decided not to fix this in this release
Ubuntu 14.04cairosvgWill not fix
Ubuntu decided not to fix this in this release
Debian 14cairosvgFixed2.5.0-1.1DEBIAN-CVE-2021-21236
Debian 13cairosvgFixed2.5.0-1.1DEBIAN-CVE-2021-21236
Debian 12cairosvgFixed2.5.0-1.1DEBIAN-CVE-2021-21236
Alpine Linux 3.24py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.23py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.22py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.21py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.20py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.19py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
Alpine Linux 3.18py3-cairosvgFixed2.5.1-r0ALPINE-CVE-2021-21236
PyPI librarycairosvgFixed2.5.1GHSA-hq37-853p-g5cf

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.