Action not permitted
Modal body text goes here.
Modal Title
Modal Body
GHSA-3C37-WWVX-H642
Vulnerability from github – Published: 2026-03-23 20:23 – Updated: 2026-03-25 20:38Summary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.8.0"
},
"package": {
"ecosystem": "PyPI",
"name": "cbor2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.9.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-26209"
],
"database_specific": {
"cwe_ids": [
"CWE-674"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-23T20:23:57Z",
"nvd_published_at": "2026-03-23T19:16:39Z",
"severity": "HIGH"
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "GHSA-3c37-wwvx-h642",
"modified": "2026-03-25T20:38:41Z",
"published": "2026-03-23T20:23:57Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads"
}
BREW-CRYTIC-COMPILE-CVE-… (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 16:41 – Updated: 2026-09-17 17:34 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@6.1.3",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "crytic-compile",
"purl": "pkg:brew/crytic-compile"
},
"ranges": [
{
"events": [
{
"introduced": "0.3.0"
},
{
"fixed": "0.3.11_3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@6.1.3",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "6.1.3"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-crytic-compile-CVE-2026-26209",
"modified": "2026-09-17T17:34:02Z",
"published": "2026-08-13T16:41:16Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-ESPHOME-CVE-2026-26209 (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 16:45 – Updated: 2026-09-17 18:34 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@5.9.0",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "esphome",
"purl": "pkg:brew/esphome"
},
"ranges": [
{
"events": [
{
"introduced": "2026.3.0"
},
{
"fixed": "2026.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@5.9.0",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "5.9.0"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-esphome-CVE-2026-26209",
"modified": "2026-09-17T18:34:33Z",
"published": "2026-08-13T16:45:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-KEEPER-COMMANDER-CV… (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:01 – Updated: 2026-09-10 00:15 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@6.1.4",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "keeper-commander",
"purl": "pkg:brew/keeper-commander"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@6.1.4",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "6.1.4"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-keeper-commander-CVE-2026-26209",
"modified": "2026-09-10T00:15:38Z",
"published": "2026-08-13T17:01:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-MAGIC-WORMHOLE-CVE-… (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:10 – Updated: 2026-09-17 18:05 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@6.1.2",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "magic-wormhole",
"purl": "pkg:brew/magic-wormhole"
},
"ranges": [
{
"events": [
{
"introduced": "0.22.0"
},
{
"fixed": "0.23.0_3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@6.1.2",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "6.1.2"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-magic-wormhole-CVE-2026-26209",
"modified": "2026-09-17T18:05:33Z",
"published": "2026-08-13T17:10:52Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-MODAL-CVE-2026-26209 (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:14 – Updated: 2026-09-10 00:32 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@6.1.4",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "modal",
"purl": "pkg:brew/modal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.5.3_1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@6.1.4",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "6.1.4"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-modal-CVE-2026-26209",
"modified": "2026-09-10T00:32:14Z",
"published": "2026-08-13T17:14:17Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-REMARSHAL-CVE-2026-26209 (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:32 – Updated: 2026-09-10 01:05 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@5.9.0",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "remarshal",
"purl": "pkg:brew/remarshal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@5.9.0",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "5.9.0"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-remarshal-CVE-2026-26209",
"modified": "2026-09-10T01:05:58Z",
"published": "2026-08-13T17:32:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
BREW-SLITHER-ANALYZER-CV… (GHSA-3C37-WWVX-H642)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:34 – Updated: 2026-09-10 20:54 – Source websiteSummary
- The
cbor2library is 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 correctly uses Python's C-API for recursion protection (Py_EnterRecursiveCall), but this mechanism is designed to prevent a stack overflow by raising aRecursionError. In some environments, this exception is not caught, thus causing the service process to terminate. - While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python's global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g.,
0x81). Whencbor2.loads()attempts to parse this, it hits the interpreter's recursion limit, causing the call to raise aRecursionError. - By sending a stream of small (<100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.
Details
- The vulnerability stems from the recursive design of the
CBORDecoderclass, specifically how it decodes nested container types like Arrays and Maps. - Inside
decode_array(and similarlydecode_map), the decoder iterates through the number of elements specified in the CBOR header. For each element, it callsself.decode()again to parse the nested item. This recursive call lacks a depth-tracking mechanism. - Vulnerable Code Locations:
cbor2/decoder.py(Pure Python implementation)source/decoder.c(C extension implementation)- Execution Flow:
- The
cbor2.loads()function initializes aCBORDecoderand calls itsdecode()method. - The
decode()method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it callsdecode_array. decode_arrayloops and callsself.decode()for each item, leading to deep recursion when parsing a payload like[...[...[1]...]...].
PoC
import cbor2
DEPTH = 1000
payload = b'\x81' * DEPTH + b'\x01'
print(f"[*] Payload size: {len(payload) / 1024:.2f} KB")
print("[*] Triggering decoder...")
try:
cbor2.loads(payload)
print("[+] Parsed successfully (Not Vulnerable)")
except RecursionError:
print("\n[!] VULNERABLE: RecursionError triggered!")
except Exception as e:
print(f"\n[-] Unexpected Error: {type(e).__name__}: {e}")
Impact
- Scope: This vulnerability affects any application using
cbor2to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption). - Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.
Credit
This issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.
| URL | Type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "cbor2",
"resource_purl": "pkg:pypi/cbor2@6.1.3",
"upstream_fixed_in": "5.9.0"
},
"package": {
"ecosystem": "Homebrew",
"name": "slither-analyzer",
"purl": "pkg:brew/slither-analyzer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.11.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/cbor2@6.1.3",
"name": "cbor2",
"resource": "cbor2",
"strategy": "registry",
"subject_version": "6.1.3"
}
]
},
"details": "### Summary\n\n- The `cbor2` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding deeply nested CBOR structures.\n- This vulnerability affects both the pure Python implementation and the C extension (`_cbor2`). The C extension correctly uses Python\u0027s C-API for recursion protection (`Py_EnterRecursiveCall`), but this mechanism is designed to prevent a stack overflow by raising a `RecursionError`. In some environments, this exception is not caught, thus causing the service process to terminate.\n- While the library handles moderate nesting, it lacks a configurable, data-driven depth limit independent of Python\u0027s global recursion setting. An attacker can supply a crafted CBOR payload containing thousands of nested arrays (e.g., `0x81`). When `cbor2.loads()` attempts to parse this, it hits the interpreter\u0027s recursion limit, causing the call to raise a `RecursionError`.\n- By sending a stream of small (\u003c100KB) malicious packets, an attacker can repeatedly crash worker processes faster than they can be restarted, resulting in a complete and sustained Denial of Service.\n\n### Details\n\n- The vulnerability stems from the recursive design of the `CBORDecoder` class, specifically how it decodes nested container types like Arrays and Maps.\n- Inside `decode_array` (and similarly `decode_map`), the decoder iterates through the number of elements specified in the CBOR header. For each element, it calls `self.decode()` again to parse the nested item. This recursive call lacks a depth-tracking mechanism.\n- Vulnerable Code Locations:\n - `cbor2/decoder.py` (Pure Python implementation)\n - `source/decoder.c` (C extension implementation)\n- Execution Flow:\n 1. The `cbor2.loads()` function initializes a `CBORDecoder` and calls its `decode()` method.\n 2. The `decode()` method reads the initial byte and dispatches control to a specific handler based on the major type. For an Array (Major Type 4), it calls `decode_array`.\n 3. `decode_array` loops and calls `self.decode()` for each item, leading to deep recursion when parsing a payload like `[...[...[1]...]...]`.\n\n### PoC\n\n```\nimport cbor2\n\nDEPTH = 1000\n\npayload = b\u0027\\x81\u0027 * DEPTH + b\u0027\\x01\u0027\nprint(f\"[*] Payload size: {len(payload) / 1024:.2f} KB\")\nprint(\"[*] Triggering decoder...\")\n\ntry:\n cbor2.loads(payload)\n print(\"[+] Parsed successfully (Not Vulnerable)\")\nexcept RecursionError:\n print(\"\\n[!] VULNERABLE: RecursionError triggered!\")\nexcept Exception as e:\n print(f\"\\n[-] Unexpected Error: {type(e).__name__}: {e}\")\n```\n\n### Impact\n\n- Scope: This vulnerability affects any application using `cbor2` to parse untrusted data. Common use cases include IoT data processing, WebAuthn (FIDO2) authentication flows, and inter-service communication over COSE (CBOR Object Signing and Encryption).\n- Attack Vector: A remote, unauthenticated attacker can achieve a full Denial of Service with a highly efficient, low-bandwidth attack. A payload under 100KB is sufficient to reliably terminate a Python worker process.\n\n### Credit\n\nThis issue was discovered by Kevin Tu of TMIR at ByteDance. The patch was developed by @agronholm.",
"id": "BREW-slither-analyzer-CVE-2026-26209",
"modified": "2026-09-10T20:54:13Z",
"published": "2026-08-13T17:34:41Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26209"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/cbor2"
},
{
"type": "WEB",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads",
"upstream": [
"GHSA-3c37-wwvx-h642",
"CVE-2026-26209",
"PYSEC-2026-2123"
]
}
CVE-2026-26209 (GCVE-0-2026-26209)
Vulnerability from cvelistv5 – Published: 2026-03-23 18:53 – Updated: 2026-03-24 18:35- CWE-674 - Uncontrolled Recursion
| URL | Tags |
|---|---|
| https://github.com/agronholm/cbor2/security/advis… | x_refsource_CONFIRM |
| https://github.com/agronholm/cbor2/pull/275 | x_refsource_MISC |
| https://github.com/agronholm/cbor2/commit/e61a5f3… | x_refsource_MISC |
| https://github.com/agronholm/cbor2/releases/tag/5.9.0 | x_refsource_MISC |
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-26209",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-03-24T18:35:22.617238Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-03-24T18:35:35.486Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "cbor2",
"vendor": "agronholm",
"versions": [
{
"status": "affected",
"version": "\u003c 5.9.0"
}
]
}
],
"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."
}
],
"metrics": [
{
"cvssV3_0": {
"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"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-674",
"description": "CWE-674: Uncontrolled Recursion",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-03-23T18:53:10.268Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
},
{
"name": "https://github.com/agronholm/cbor2/pull/275",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"name": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"name": "https://github.com/agronholm/cbor2/releases/tag/5.9.0",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
}
],
"source": {
"advisory": "GHSA-3c37-wwvx-h642",
"discovery": "UNKNOWN"
},
"title": "cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-26209",
"datePublished": "2026-03-23T18:53:10.268Z",
"dateReserved": "2026-02-11T19:56:24.814Z",
"dateUpdated": "2026-03-24T18:35:35.486Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
PYSEC-2026-2123
Vulnerability from pysec - Published: 2026-03-23 19:16 - Updated: 2026-07-13 05:48cbor2 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.
| Name | purl | cbor2 | pkg:pypi/cbor2 |
|---|
{
"affected": [
{
"ecosystem_specific": {},
"package": {
"ecosystem": "PyPI",
"name": "cbor2",
"purl": "pkg:pypi/cbor2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.9.0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.0.0",
"1.1.0",
"2.0.0",
"3.0.0",
"3.0.1",
"3.0.2",
"3.0.3",
"3.0.4",
"4.0.0",
"4.0.1",
"4.1.0",
"4.1.1",
"4.1.2",
"5.0.0",
"5.0.1",
"5.1.0",
"5.1.1",
"5.1.2",
"5.2.0",
"5.2.0.post1",
"5.3.0",
"5.4.0",
"5.4.1",
"5.4.2",
"5.4.2.post1",
"5.4.3",
"5.4.4",
"5.4.5",
"5.4.6",
"5.5.0",
"5.5.1",
"5.6.0",
"5.6.1",
"5.6.2",
"5.6.3",
"5.6.4",
"5.6.5",
"5.7.0",
"5.7.1",
"5.8.0"
]
}
],
"aliases": [
"CVE-2026-26209",
"GHSA-3c37-wwvx-h642"
],
"details": "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.",
"id": "PYSEC-2026-2123",
"modified": "2026-07-13T05:48:11.115084Z",
"published": "2026-03-23T19:16:39.530Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/agronholm/cbor2/releases/tag/5.9.0"
},
{
"type": "FIX",
"url": "https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b"
},
{
"type": "FIX",
"url": "https://github.com/agronholm/cbor2/pull/275"
},
{
"type": "EVIDENCE",
"url": "https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642"
}
],
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
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.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.