{"id":"UBUNTU-CVE-2021-21236","details":"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.","modified":"2026-05-20T16:06:26.077617049Z","published":"2021-01-06T17:15:00Z","upstream":["CVE-2021-21236"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-21236"},{"type":"REPORT","url":"https://github.com/Kozea/CairoSVG/security/advisories/GHSA-hq37-853p-g5cf"},{"type":"REPORT","url":"https://github.com/Kozea/CairoSVG/commit/063185b60588a41d4df661ad70f9f7b699901abc"},{"type":"REPORT","url":"https://github.com/Kozea/CairoSVG/commit/cfc9175e590531d90384aa88845052de53d94bf3"},{"type":"REPORT","url":"https://github.com/Kozea/CairoSVG/releases/tag/2.5.1"},{"type":"REPORT","url":"https://pypi.org/project/CairoSVG/"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-21236"}],"affected":[{"package":{"name":"cairosvg","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.16-1","1.0.17-1","1.0.19-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-cairosvg","binary_version":"1.0.19-1"},{"binary_name":"python3-cairosvg","binary_version":"1.0.19-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.20-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-cairosvg","binary_version":"1.0.20-1"},{"binary_version":"1.0.20-1","binary_name":"python3-cairosvg"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.4.0-2","2.4.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cairosvg","binary_version":"2.4.2-1"},{"binary_name":"python3-cairosvg","binary_version":"2.4.2-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.0-1.1","2.5.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cairosvg","binary_version":"2.5.2-1"},{"binary_version":"2.5.2-1","binary_name":"python3-cairosvg"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cairosvg","binary_version":"2.7.1-1"},{"binary_name":"python3-cairosvg","binary_version":"2.7.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7.1-1","2.7.1-2"],"ecosystem_specific":{"binaries":[{"binary_name":"cairosvg","binary_version":"2.7.1-2"},{"binary_name":"python3-cairosvg","binary_version":"2.7.1-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}},{"package":{"name":"cairosvg","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/cairosvg?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7.1-2","2.8.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cairosvg","binary_version":"2.8.2-1"},{"binary_name":"python3-cairosvg","binary_version":"2.8.2-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21236.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}