Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31899: CWE-674: Uncontrolled Recursion in Kozea CairoSVG

0
High
VulnerabilityCVE-2026-31899cvecve-2026-31899cwe-674
Published: Fri Mar 13 2026 (03/13/2026, 19:38:43 UTC)
Source: CVE Database V5
Vendor/Project: Kozea
Product: CairoSVG

Description

CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to Kozea/CairoSVG has exponential denial of service via recursive <use> element amplification in cairosvg/defs.py. This causes CPU exhaustion from a small input.

AI-Powered Analysis

AILast updated: 03/13/2026, 20:29:19 UTC

Technical Analysis

CVE-2026-31899 is a vulnerability classified under CWE-674 (Uncontrolled Recursion) found in Kozea's CairoSVG, an SVG to PNG/PDF converter built on the Cairo 2D graphics library. The flaw exists in the handling of the <use> SVG element within the cairosvg/defs.py module, where recursive references can cause exponential amplification of processing calls. This uncontrolled recursion leads to excessive CPU consumption, effectively resulting in a denial of service condition. The vulnerability can be triggered by supplying a crafted SVG file containing nested <use> elements that reference each other recursively. Because the vulnerability requires no privileges or user interaction and can be exploited remotely by processing malicious SVG inputs, it poses a significant risk to systems that automatically convert or render SVG files, such as web servers, document processing pipelines, or graphic conversion services. The CVSS v3.1 score is 7.5, reflecting high severity due to network attack vector, low attack complexity, no privileges required, and no user interaction needed. The impact is limited to availability degradation, with no direct compromise of confidentiality or integrity. No known public exploits have been reported yet, and no official patches were linked at the time of disclosure, though upgrading to version 2.9.0 or later is recommended once available.

Potential Impact

The primary impact of CVE-2026-31899 is denial of service through CPU exhaustion, which can disrupt services relying on CairoSVG for SVG rendering or conversion. Organizations that process untrusted or user-supplied SVG content are particularly vulnerable, as attackers can submit crafted SVG files to trigger the recursion and exhaust server resources. This can lead to service outages, degraded performance, and potential cascading failures in dependent systems. The vulnerability does not expose sensitive data or allow code execution, but the availability impact can affect web applications, content management systems, and automated document workflows globally. High-volume or automated processing environments are at greater risk due to the amplification effect. Additionally, denial of service conditions can be leveraged as part of multi-vector attacks or to distract from other malicious activities.

Mitigation Recommendations

To mitigate CVE-2026-31899, organizations should upgrade CairoSVG to version 2.9.0 or later once the patch is released. Until then, implement strict input validation to detect and reject SVG files containing recursive <use> elements or excessively nested references. Employ resource usage limits such as CPU timeouts or process isolation when processing SVG files to prevent a single input from exhausting system resources. Consider sandboxing SVG rendering processes to contain potential denial of service impacts. Monitoring for unusual CPU spikes or processing delays during SVG conversions can help detect exploitation attempts. If upgrading is not immediately possible, disabling or restricting SVG processing in untrusted contexts is advisable. Developers should also review and harden any custom SVG parsing logic to prevent similar recursion issues.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-09T21:59:02.689Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69b4732e2f860ef943a92619

Added to database: 3/13/2026, 8:27:26 PM

Last enriched: 3/13/2026, 8:29:19 PM

Last updated: 3/14/2026, 3:49:35 AM

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses