Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. CairoSVG
  4. ›
  5. CVE-2021-21236

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

January 6, 2021 (updated September 13, 2024)

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.

References

  • github.com/Kozea/CairoSVG
  • github.com/Kozea/CairoSVG/commit/cfc9175e590531d90384aa88845052de53d94bf3
  • github.com/Kozea/CairoSVG/releases/tag/2.5.1
  • github.com/Kozea/CairoSVG/security/advisories/GHSA-hq37-853p-g5cf
  • github.com/advisories/GHSA-hq37-853p-g5cf
  • github.com/pypa/advisory-database/tree/main/vulns/cairosvg/PYSEC-2021-5.yaml
  • nvd.nist.gov/vuln/detail/CVE-2021-21236
  • pypi.org/project/CairoSVG

Code Behaviors & Features

Detect and mitigate CVE-2021-21236 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.5.1

Fixed versions

  • 2.5.1

Solution

Upgrade to version 2.5.1 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

pypi/CairoSVG/CVE-2021-21236.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:16 +0000.