CVE-2021-21236Regular Expression Denial of Service in CairoSVG
- 5.7MediumCVSS base score
- 1.4%Exploitation in 30 daysEPSS · top 28% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 15 days later
· 15 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 1.4% · top 28% of all CVEs (18 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.7.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPICairoSVGGHSA-hq37-853p-g5cf (opens in a new tab)
References
References4
- https://github.com/Kozea/CairoSVG/security/advisories/GHSA-hq37-853p-g5cf (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://pypi.org/project/CairoSVG/ (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/Kozea/CairoSVG/commit/cfc9175e590531d90384aa88845052de53d94bf3 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/Kozea/CairoSVG/releases/tag/2.5.1 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0039 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-hq37-853p-g5cf (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21236)Record last updated .