Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft deeply nested CBOR structure
-
DeliverySend to cbor2 decoder
-
ExploitTrigger uncontrolled recursion
-
ExecutionExceed Python recursion limit
-
ImpactCrash worker process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Remote unauthenticated attacker sends crafted CBOR-encoded data containing deeply nested structures to any application using cbor2 versions prior to 5.9.0. No special configuration required; vulnerability exists in default installations. C extension |
| Impact | This vulnerability presents a high real-world risk despite lacking KEV listing or public EPSS scoring. The CVSS 3.0 score of 7.5 (AV:N/AC:L/PR:N/UI:N) indicates a remotely exploitable attack with low complexity requiring no authentication or user interaction, targeting availability exclusively (A:H). The attack is highly automatable and can be weaponized against any internet-facing service accepting CBOR input. The technical impact is significant because modern web architectures using process-per-worker models (Gunicorn, Uvicorn, Celery) will crash worker processes on RecursionError, and repeated attacks can sustain complete service outages. The small payload size (under 100KB) means attackers can launch bandwidth-efficient attacks. The availability of detailed technical information in the GitHub Security Advisory (GHSA-3c37-wwvx-h642) and a merged patch (PR #275) suggests the vulnerability is well-understood and likely to be exploited if applications remain unpatched. This is a genuine priority requiring immediate action for any service processing untrusted CBOR data. |
| Exploit ScenarioDerived | An attacker identifies a public API endpoint that accepts CBOR-encoded requests, such as a REST API using CBOR for efficient binary serialization or a message queue consumer processing CBOR messages. The attacker crafts a malicious CBOR payload containing approximately 100,000 nested arrays (each represented by byte 0x81), resulting in a file size under 100KB, and sends it to the vulnerable endpoint. When the application calls cbor2.loads() to decode the payload, the recursive parsing exhausts the stack and raises a RecursionError, immediately crashing the worker process. By automating this attack and sending a continuous stream of these payloads, the attacker can crash all worker processes faster than they can respawn, effectively rendering the service unavailable to legitimate users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 23, 2026
The cbor2 Python library, which implements CBOR serialization, suffers from uncontrolled recursion when decoding deeply nested CBOR structures, allowing remote attackers to trigger Denial of Service by sending crafted payloads containing approximately 100,000 nested arrays. All versions prior to 5.9.0 are affected, including both the pure Python implementation and the C extension. Attackers can crash worker processes in web servers (Gunicorn, Uvicorn) and task queues (Celery) with small malicious packets under 100KB, causing complete service outages through repeated worker crashes.
RemediationAI
Upgrade cbor2 to version 5.9.0 or later immediately, as documented in the release notes at https://github.com/agronholm/cbor2/releases/tag/5.9.0. The fix is implemented in commit e61a5f365ba610d5907a0ae1bc72769bba34294b (https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b) and merged via pull request #275 (https://github.com/agronholm/cbor2/pull/275). For environments where immediate patching is not feasible, implement input validation to reject CBOR payloads exceeding a reasonable size threshold (e.g., 50KB) and deploy rate limiting on endpoints accepting CBOR data to mitigate repeated crash attempts. Consider switching to alternative serialization formats (JSON, MessagePack) if CBOR is not strictly required. Review application monitoring to detect and alert on repeated worker crashes that may indicate active exploitation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
cbor2 (CPE: cpe:2.3:a:agronholm:cbor2) is a Python library providing encoding and decoding for CBOR (Concise Binary Object Representation), a binary data serialization format defined in RFC 8949. The vulnerability stems from CWE-674 (Uncontrolled Recursion), where the library fails to enforce a hard depth limit when parsing nested CBOR structures. Both the pure Python implementation and the C extension _cbor2 are affected; the C extension relies on Python's Py_EnterRecursiveCall mechanism rather than implementing its own data-driven depth constraints. When processing deeply nested arrays (marked by CBOR byte 0x81), the recursive decoding calls exhaust either the Python interpreter's recursion limit or the stack memory, resulting in RecursionError exceptions that terminate the process. This vulnerability is triggered during the cbor2.loads() function call when parsing malicious CBOR payloads.
Know when Cbor2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) serialization format. Versions prior to 5.9.0 are vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures. This vulnerability affects both the pure Python implementation and the C extension _cbor2. The C extension relies on Python's internal recursion limits Py_EnterRecursiveCall rather than a data-driven depth limit, meaning it still raises RecursionError and crashes the worker process when the limit is hit. While the library handles moderate nesting levels, it lacks a hard depth limit. An attacker can supply a crafted CBOR payload containing approximately 100,000 nested arrays 0x81. When cbor2.loads() attempts to parse this, it hits the Python interpreter's maximum recursion depth or exhausts the stack, causing the process to crash with a RecursionError. Because the library does not enforce its own limits, it allows an external attacker to exhaust the host application's stack resource. In many web application servers (e.g., Gunicorn, Uvicorn) or task queues (Celery), an unhandled RecursionError terminates the worker process immediately. By sending a stream of these small (<100KB) malicious packets, an attacker can repeatedly crash worker processes, resulting in a complete Denial of Service for the application. Version 5.9.0 patches the issue.
Executive ViewAI
Organizations using the cbor2 Python library face immediate service disruption risk, as attackers can crash application workers with small malicious packets, causing complete outages. This affects any infrastructure running web services or task queues that decode CBOR data, and no patch is currently available, requiring urgent defensive measures.
Implement Web Application Firewall (WAF) rules to detect and block deeply nested CBOR structures and payloads exceeding normal size thresholds; enforce strict request size limits (e.g., <10KB for CBOR); add recursion depth monitoring and limits in application code before cbor2 deserialization; isolate CBOR processing in resource-limited containers with automatic restart policies; implement rate limiting on CBOR endpoints; disable CBOR functionality where not essential; segment untrusted input sources at network level; deploy request validation to reject suspicious patterns prior to deserialization.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Multiple vulnerabilities exist in cbor2 through version 5.7.0 in the decode_definite_long_string() function of the C ext
cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format
Same weakness CWE-674 – Uncontrolled Recursion
View allSame technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Leap 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
EUVD-2026-14478
GHSA-3c37-wwvx-h642
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB