5.7

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

Modified
AliasesMGASA-2021-0149GHSA-hq37-853p-g5cfPYSEC-2021-5
Published 06-01-2021Last modified 03-08-2024

Vulnerability summary

CVE-2021-21236 is a medium (CVSS 5.7) Uncontrolled Resource Consumption vulnerability in courtbouillon cairosvg. EPSS estimates a 1.37% chance of exploitation in the next 30 days, higher than 72.9% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.7, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.7/10
010
Medium · v3.1 (CVE.org)
EPSS score
1.37%
0%100%
Low · +0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 3 · Related 3

Timeline

  1. 06-01-2021
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

8 scores · 6 sources · 3 versions

EPSS trend

Probability

1.37%

Chance of exploitation in the next 30 days

Percentile

73%

Versus all other CVEs

30-day change

Increase +0.01 pp

From 1.37% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Cairosvg

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Alpine1 product
  • py3-cairosvg< 2.5.1-r0
Courtbouillon1 product
Debian1 product
  • cairosvg< 2.5.0-1.1
Kozea1 product
Mageia1 product
  • python-cairosvg< 2.2.1-1.1.mga7
PyPI1 product
  • cairosvg< cfc9175e590531d90384aa88845052de53d94bf3 | < 2.5.1
Ubuntu1 product
  • cairosvgAll versions (No fix recorded)

7 vendors · 7 products

References

16 links
Show all 16 references