{"id":"CVE-2021-21236","published":"2021-01-06T17:00:19Z","modified":"2024-08-03T18:09:15Z","title":"Regular Expression Denial of Service in CairoSVG","vendor":"Kozea","product":"CairoSVG","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.7,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01368,"percentile":0.72556,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/Kozea/CairoSVG/security/advisories/GHSA-hq37-853p-g5cf","tags":["x_refsource_CONFIRM"]},{"url":"https://pypi.org/project/CairoSVG/","tags":["x_refsource_MISC"]},{"url":"https://github.com/Kozea/CairoSVG/commit/cfc9175e590531d90384aa88845052de53d94bf3","tags":["x_refsource_MISC"]},{"url":"https://github.com/Kozea/CairoSVG/releases/tag/2.5.1","tags":["x_refsource_MISC"]}],"priority":{"score":18.5,"factors":[{"name":"EPSS percentile","points":14.51},{"name":"CVSS severity","points":3.99}]},"vendorSlug":"kozea","affectedVersions":[{"vendor":"Kozea","product":"CairoSVG","versions":["< 2.5.1"]}],"affected":[{"ecosystem":"PyPI","package":"CairoSVG","vulnerableRanges":["<2.5.1"],"patched":["2.5.1"],"from":["GHSA-hq37-853p-g5cf","PYSEC-2021-5"],"provenance":"source"}],"summary":{"text":"CairoSVG, an SVG-to-image converter based on Cairo and distributed as a Python package, contains a regular expression denial of service flaw in two of its regular expressions used when processing SVG files. An attacker who can get a crafted SVG file processed by CairoSVG, with a low-privilege account and requiring a user to take an action such as opening or submitting the file, can cause the converter to stall on the file for a very long time.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:47Z"},"euvd":{"id":"EUVD-2021-0039","exploited":false,"provenance":"source"}}