FKIE_CVE-2026-26209
Vulnerability from fkie_nvd - Published: 2026-03-23 19:16 - Updated: 2026-03-25 17:56
Severity ?
Summary
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.
References
{
"configurations": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:agronholm:cbor2:*:*:*:*:*:python:*:*",
"matchCriteriaId": "DAC7F8CF-AB35-48ED-B4F6-5DEDFCE12F61",
"versionEndExcluding": "5.9.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s 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\u0027s 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\u0027s 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 (\u003c100KB) 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."
},
{
"lang": "es",
"value": "cbor2 proporciona codificaci\u00f3n y decodificaci\u00f3n para el formato de serializaci\u00f3n Concise Binary Object Representation (CBOR). Las versiones anteriores a la 5.9.0 son vulnerables a un ataque de denegaci\u00f3n de servicio (DoS) causado por recursi\u00f3n incontrolada al decodificar estructuras CBOR profundamente anidadas. Esta vulnerabilidad afecta tanto a la implementaci\u00f3n pura de Python como a la extensi\u00f3n C \u0027_cbor2\u0027. La extensi\u00f3n C se basa en los l\u00edmites de recursi\u00f3n internos de Python \u0027Py_EnterRecursiveCall\u0027 en lugar de un l\u00edmite de profundidad basado en datos, lo que significa que a\u00fan genera \u0027RecursionError\u0027 y bloquea el proceso de trabajo cuando se alcanza el l\u00edmite. Aunque la biblioteca maneja niveles de anidamiento moderados, carece de un l\u00edmite de profundidad estricto. Un atacante puede proporcionar una carga \u00fatil CBOR manipulada que contenga aproximadamente 100.000 arrays anidados \u00270x81\u0027. Cuando \u0027cbor2.loads()\u0027 intenta analizar esto, alcanza la profundidad m\u00e1xima de recursi\u00f3n del int\u00e9rprete de Python o agota la pila, lo que provoca que el proceso falle con un \u0027RecursionError\u0027. Debido a que la biblioteca no impone sus propios l\u00edmites, permite que un atacante externo agote el recurso de pila de la aplicaci\u00f3n anfitriona. En muchos servidores de aplicaciones web (p. ej., Gunicorn, Uvicorn) o colas de tareas (Celery), un \u0027RecursionError\u0027 no manejado termina el proceso de trabajo inmediatamente. Al enviar un flujo de estos peque\u00f1os paquetes maliciosos (\u0026lt;100KB), un atacante puede bloquear repetidamente los procesos de trabajo, lo que resulta en una denegaci\u00f3n de servicio completa para la aplicaci\u00f3n. La versi\u00f3n 5.9.0 corrige el problema."
}
],
"id": "CVE-2026-26209",
"lastModified": "2026-03-25T17:56:15.630",
"metrics": {
"cvssMetricV30": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.0"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6,
"source": "security-advisories@github.com",
"type": "Secondary"
}
]
},
"published": "2026-03-23T19:16:39.530",
"references": [
{
"source": "security-advisories@github.com",
"tags": [
"Patch"
],
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"source": "security-advisories@github.com",
"tags": [
"Issue Tracking",
"Patch"
],
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"source": "security-advisories@github.com",
"tags": [
"Product",
"Release Notes"
],
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
},
{
"source": "security-advisories@github.com",
"tags": [
"Exploit",
"Vendor Advisory"
],
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
}
],
"sourceIdentifier": "security-advisories@github.com",
"vulnStatus": "Analyzed",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-674"
}
],
"source": "security-advisories@github.com",
"type": "Primary"
}
]
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…