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

Machine-generated threat intelligence

AILast updated: 03/21/2026, 00:39:03 UTC

Technical Analysis

CVE-2026-31899 identifies a vulnerability in Kozea CairoSVG, an SVG converter that relies on the Cairo 2D graphics library. The issue stems from uncontrolled recursion in the handling of the SVG <use> element within the cairosvg/defs.py file. Specifically, recursive references in SVG files can cause exponential amplification of processing calls, leading to CPU exhaustion and denial of service. This vulnerability is classified under CWE-674 (Uncontrolled Recursion), highlighting the failure to limit recursion depth or detect cyclic references during SVG parsing. The flaw affects all CairoSVG versions prior to 2.9.0. Exploitation requires no privileges or user interaction and can be triggered remotely by submitting crafted SVG content to applications or services that utilize vulnerable CairoSVG versions for SVG rendering or conversion. The CVSS v3.1 base score is 7.5, reflecting a high severity due to network attack vector, low attack complexity, no privileges required, no user interaction, and a significant impact on availability without affecting confidentiality or integrity. No patches or exploit code are currently publicly available, but the vulnerability's nature suggests that attackers could easily craft malicious SVG files to cause service disruption. The vulnerability poses a risk to any system or service that processes untrusted SVG files using affected CairoSVG versions, including web applications, document converters, and graphic design tools.

Potential Impact

The primary impact of CVE-2026-31899 is a denial of service condition caused by CPU exhaustion, which can render affected systems unresponsive or degrade performance severely. Organizations relying on CairoSVG for SVG rendering or conversion in web services, automated document processing, or graphic pipelines may experience outages or degraded service availability if targeted by this vulnerability. This can disrupt business operations, lead to service downtime, and potentially cause cascading failures in dependent systems. Since the vulnerability does not affect confidentiality or integrity, data breaches are unlikely; however, the availability impact alone can be critical for high-availability environments. Attackers can exploit this vulnerability remotely without authentication or user interaction, increasing the risk of automated or large-scale attacks. The lack of known exploits in the wild currently reduces immediate risk but does not eliminate the threat, especially as public awareness and exploit development may follow. Organizations processing untrusted SVG inputs are particularly vulnerable, including cloud services, content management systems, and graphic design platforms.

Mitigation Recommendations

To mitigate CVE-2026-31899, organizations should immediately upgrade CairoSVG to version 2.9.0 or later, where the uncontrolled recursion issue has been addressed. If upgrading is not immediately feasible, implement strict input validation to reject SVG files containing recursive <use> elements or excessively nested references. Employ resource limits such as CPU timeouts or process isolation when processing SVG files to prevent a single malicious input from exhausting system resources. Monitor CPU usage patterns and application logs for signs of abnormal resource consumption during SVG processing. Consider sandboxing SVG rendering processes to contain potential denial of service impacts. Additionally, review and harden any web services or APIs that accept SVG uploads to ensure they do not process untrusted files without proper sanitization. Maintain awareness of updates from the Kozea project and security advisories for any patches or mitigations. Finally, educate development and operations teams about the risks of processing untrusted SVG content and incorporate secure coding practices to handle recursive structures safely.

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/21/2026, 12:39:03 AM

Last updated: 4/28/2026, 11:05:29 AM

Views: 78

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 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