{"answers":{"affected":"3 open source packages ship an affected version, including cairosvg and CairoSVG. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31899 exists.","fix":"Upgrade cairosvg to 2.9.0 or later.","what":"CVE-2026-31899 is a high-severity denial of service vulnerability in Kozea CairoSVG, published on 13 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-31899 and fix it if it is affected.\n\nWhat it is: CVE-2026-31899 is a high-severity denial of service vulnerability in Kozea CairoSVG, published on 13 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31899 exists.\n\nAffected packages and fixed versions:\n- cairosvg (PyPI): affected all versions; fixed in 2.9.0\n- cairosvg (PyPI): affected all versions; fixed in 2.9.0\n- CairoSVG (PyPI): affected all versions; fixed in 2.9.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-31899/ (Markdown: https://insights.sbomify.com/CVE-2026-31899/index.md)","id":"CVE-2026-31899","markdown":"https://insights.sbomify.com/CVE-2026-31899/index.md","name":"CVE-2026-31899","record":{"aliases":["DEBIAN-CVE-2026-31899","GHSA-f38f-5xpm-9r7c","MGASA-2026-0104","PYSEC-2026-2122","ROOT-APP-PYPI-CVE-2026-31899","SUSE-SU-2026:1421-1","SUSE-SU-2026:22024-1","UBUNTU-CVE-2026-31899","openSUSE-SU-2026:10379-1","openSUSE-SU-2026:11729-1","openSUSE-SU-2026:20886-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Python SVG converter","requires_auth":"none","summary":"An attacker can cause CPU exhaustion and denial of service by submitting a crafted SVG file with recursive use elements to applications using CairoSVG.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"cairosvg","vendor":"courtbouillon"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"description":"CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to Kozea/CairoSVG has exponential denial of service via recursive \u003cuse\u003e element amplification in cairosvg/defs.py. This causes CPU exhaustion from a small input.","ecosystems":["PyPI","SUSE:Linux Enterprise Module for Python 3 15 SP7","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP applications 16.0","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2026-03-15","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-03-15T08:25:43Z","kind":"github_poc","ref":"https://github.com/SnailSploit/CVE-2026-31899","stars":1,"title":"CVE-2026-31899: Exponential DoS via Recursive \u003cuse\u003e Element Amplification in CairoSVG (CVSS 7.5 High)"}],"tier":"weaponised"},"has_fix":true,"headline":"CairoSVG vulnerable to Exponential DoS via recursive \u003cuse\u003e element amplification","id":"CVE-2026-31899","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":9,"n_references":2,"next":{"headline":"Black's vulnerable version parsing leads to RCE in GitHub Action","id":"CVE-2026-31900"},"packages":[{"ecosystem":"PyPI","fixed":["2.9.0"],"introduced":["0"],"last_affected":[],"package":"CairoSVG","purl":null,"source":"GHSA-f38f-5xpm-9r7c"},{"ecosystem":"PyPI","fixed":["2.9.0"],"introduced":["0"],"last_affected":[],"package":"cairosvg","purl":"pkg:pypi/cairosvg","source":"GHSA-f38f-5xpm-9r7c"},{"ecosystem":"PyPI","fixed":["2.9.0"],"introduced":["0"],"last_affected":[],"package":"cairosvg","purl":"pkg:pypi/cairosvg","source":"PYSEC-2026-2122"},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","fixed":["2.7.1-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-CairoSVG","purl":"pkg:rpm/suse/python-CairoSVG\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP7","source":"SUSE-SU-2026:1421-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["2.7.1-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-CairoSVG","purl":"pkg:rpm/suse/python-CairoSVG\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:22024-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["2.7.1-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-CairoSVG","purl":"pkg:rpm/suse/python-CairoSVG\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:22024-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["2.7.1-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-CairoSVG","purl":"pkg:rpm/opensuse/python-CairoSVG\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2026:1421-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["26.8.0-1.1"],"introduced":["0"],"last_affected":[],"package":"ansible-creator","purl":"pkg:rpm/opensuse/ansible-creator\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11729-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.9.0-1.1"],"introduced":["0"],"last_affected":[],"package":"python-CairoSVG","purl":"pkg:rpm/opensuse/python-CairoSVG\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:10379-1"}],"prev":{"headline":"jsPDF has a PDF Object Injection via FreeText color","id":"CVE-2026-31898"},"products":["CairoSVG"],"published":"2026-03-13","related":[{"cvss_score":9.9,"headline":"CairoSVG improperly processes SVG files loaded from external resources","id":"CVE-2023-27586","kev_date_added":null,"published":"2023-03-20"},{"cvss_score":5.7,"headline":"Regular Expression Denial of Service in CairoSVG","id":"CVE-2021-21236","kev_date_added":null,"published":"2021-01-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-03-16","vendors":["Kozea"]},"summary":"An attacker can cause CPU exhaustion and denial of service by submitting a crafted SVG file with recursive use elements to applications using CairoSVG.","url":"https://insights.sbomify.com/CVE-2026-31899/"}