
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-31899 is an exponential Denial of Service vulnerability in CairoSVG caused by uncontrolled recursive processing of SVG <use> elements. It affects all versions of CairoSVG prior to 2.9.0 (i.e., <= 2.8.2) and was disclosed on March 13, 2026, by researcher Kai Aizen (SnailSploit). The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (Github Advisory, CairoSVG Advisory). CairoSVG is a widely used Python library with approximately 300,000 downloads per week.
The root cause is uncontrolled recursion (CWE-674) and improper restriction of recursive entity references (CWE-776) in the use() function within cairosvg/defs.py (around line 335). This function processes SVG <use> elements — which reference and re-render other SVG nodes — without any depth limit or total element budget, enabling exponential amplification: with 5 levels of nesting and 10 references per level, a 1,411-byte SVG input triggers 10^5 (100,000) render calls. The attack requires no authentication, no special privileges, and no user interaction — an attacker simply submits a crafted SVG file to any endpoint that passes it to CairoSVG for processing (CairoSVG Advisory, Github Advisory). A public PoC repository with the exact SVG payload and reproduction steps is available (SnailSploit PoC).
Successful exploitation causes the affected process to consume 100% CPU indefinitely while memory remains stable at approximately 43MB, meaning the process never terminates on its own and is not killed by OOM mechanisms. Any service that accepts SVG input and passes it to CairoSVG — including image thumbnailing pipelines, PDF generation services, and avatar rendering endpoints — is vulnerable to complete availability loss. There is no confidentiality or integrity impact; the sole consequence is a sustained denial of service that renders the affected service unresponsive to legitimate requests (CairoSVG Advisory, Github Advisory).
A functional proof-of-concept exploit is publicly available on GitHub, including the 1,411-byte SVG payload and step-by-step reproduction instructions (SnailSploit PoC). The vulnerability requires no authentication, no privileges, and no user interaction, making it trivially exploitable by any network-accessible attacker. As of the time of reporting, there is no evidence of active in-the-wild exploitation, and the CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.04% (12th percentile), indicating a currently low but non-negligible probability of exploitation (Github Advisory).
<use> elements, each referencing 10 child elements, creating an O(10^N) amplification tree. The PoC payload is publicly available at SnailSploit PoC.poc.svg to the target service's SVG-processing endpoint (e.g., a file upload form, API endpoint, or avatar upload feature).use() function in defs.py begins recursively processing the nested <use> elements without any depth or count limit, triggering 100,000+ render calls and pinning the server CPU at 100% indefinitely.python, gunicorn, uwsgi, celery) consuming 100% CPU for extended periods without completing; processes that never terminate after receiving an SVG input.The primary remediation is to upgrade CairoSVG to version 2.9.0 or later, which introduces a hard limit of 100,000 referenced elements per render operation, aborting with a ValueError if exceeded (CairoSVG Commit). As interim workarounds, operators should implement input validation to reject oversized or structurally suspicious SVG files before they reach CairoSVG, apply rate limiting on SVG-processing endpoints, and enforce process-level timeouts (e.g., using signal.alarm() or external timeout wrappers) to kill hung rendering jobs. Monitoring CPU usage on SVG-processing services is recommended to detect exploitation attempts (Github Advisory, Red Hat Bugzilla).
Red Hat tracked the vulnerability via Bugzilla (Bug 2447447) and assessed it as high severity, with downstream package updates initiated for Fedora and RHEL ecosystems (Red Hat Bugzilla). SUSE and openSUSE issued security advisories and updated their python-cairosvg packages, and Mageia also released an advisory. Tenable published multiple Nessus detection plugins (IDs 302268, 306609, 306605, 307434) to identify vulnerable CairoSVG installations. The vulnerability received coverage from Linux security news outlets including linuxsecurity.com and pro-linux.de, reflecting broad awareness in the open-source ecosystem.
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
cairosvg
devel
cairosvg
focal (esm-apps)
cairosvg
jammy
cairosvg
jammy (esm-apps)
cairosvg
noble
cairosvg
noble (esm-apps)
cairosvg
resolute
cairosvg
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."