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-26209: CWE-674: Uncontrolled Recursion in agronholm cbor2

0
High
VulnerabilityCVE-2026-26209cvecve-2026-26209cwe-674
Published: Mon Mar 23 2026 (03/23/2026, 18:53:10 UTC)
Source: CVE Database V5
Vendor/Project: agronholm
Product: cbor2

Description

CVE-2026-26209 is a high-severity vulnerability in the cbor2 Python library versions prior to 5. 9. 0. It arises from uncontrolled recursion when decoding deeply nested CBOR data structures, allowing an attacker to cause a Denial of Service (DoS) by crashing the worker process. The vulnerability affects both the pure Python and C extension implementations, which rely on Python's recursion limits rather than enforcing a strict depth limit. An attacker can craft a CBOR payload with approximately 100,000 nested arrays to exhaust the stack, triggering a RecursionError and terminating the process. This can be exploited repeatedly with small payloads to disrupt applications using cbor2, such as web servers and task queues. Version 5. 9. 0 patches this issue.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/30/2026, 20:28:21 UTC

Technical Analysis

The vulnerability CVE-2026-26209 affects the cbor2 library, which is used for encoding and decoding CBOR (Concise Binary Object Representation) data in Python. Versions before 5.9.0 do not impose a hard limit on the recursion depth when decoding nested CBOR structures. Both the pure Python implementation and the C extension `_cbor2` rely on Python's internal recursion checks (`Py_EnterRecursiveCall`) rather than a data-driven depth limit. This means that when processing deeply nested CBOR payloads—such as those containing around 100,000 nested arrays (0x81)—the decoding function triggers Python's maximum recursion depth or stack exhaustion, resulting in a `RecursionError`. This error is unhandled in many applications, causing immediate termination of worker processes. Applications using cbor2 in environments like Gunicorn, Uvicorn, or Celery are particularly vulnerable because repeated delivery of these crafted payloads can crash multiple workers, leading to a full Denial of Service. The malicious payloads are relatively small (<100KB), making the attack bandwidth-efficient. The issue was fixed in version 5.9.0 by presumably adding proper recursion depth checks or limits. No known exploits are reported in the wild yet, but the vulnerability is publicly disclosed with a CVSS 3.0 score of 7.5, indicating high severity due to ease of exploitation (network vector, no privileges or user interaction required) and total loss of availability.

Potential Impact

This vulnerability can cause complete Denial of Service for applications relying on cbor2 for CBOR data parsing. Since many Python web servers and task queues use cbor2, attackers can repeatedly crash worker processes by sending crafted CBOR payloads, leading to service outages and degraded availability. The attack does not compromise confidentiality or integrity but can severely disrupt business operations, especially for services that rely on CBOR for communication or data serialization. The low size of malicious payloads makes the attack feasible even in bandwidth-constrained environments. Organizations using vulnerable versions of cbor2 in critical infrastructure, microservices, or cloud-native applications risk significant downtime and potential cascading failures if worker processes are not properly isolated or restarted. The vulnerability also increases operational costs due to increased resource consumption and incident response efforts.

Mitigation Recommendations

1. Upgrade cbor2 to version 5.9.0 or later immediately to apply the official patch that enforces recursion depth limits. 2. Implement input validation and rate limiting on CBOR payloads to detect and block unusually deeply nested or large CBOR structures before decoding. 3. Use application-level circuit breakers or worker process supervisors that can gracefully handle RecursionError exceptions without crashing the entire worker. 4. Consider sandboxing or isolating CBOR decoding in separate processes or containers to limit the blast radius of crashes. 5. Monitor application logs for RecursionError or worker crashes indicative of exploitation attempts. 6. If upgrading is not immediately possible, patch or monkey-patch the cbor2 library to add explicit depth limits on recursion during decoding. 7. Educate developers and DevOps teams about this vulnerability and incorporate CBOR payload fuzz testing into CI/CD pipelines to detect similar issues early.

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-02-11T19:56:24.814Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 69c18de6f4197a8e3b82dd7b

Added to database: 3/23/2026, 7:00:54 PM

Last enriched: 3/30/2026, 8:28:21 PM

Last updated: 4/30/2026, 10:55:47 AM

Views: 94

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