# CVE-2026-26209: cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.0, CNA) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.75% (percentile 51, 2026-11-26)
- **CWE:** CWE-674
- **Aliases:** GHSA-3c37-wwvx-h642, PYSEC-2026-2123
- **Published:** 2026-03-23T18:53:10.268Z
- **Modified:** 2026-09-10T03:50:36.691Z

## Who should check

- Projects that depend on PyPI package cbor2 (\< 5.9.0)
- Anyone running agronholm cbor2 \< 5.9.0

## Description

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.

## Affected and fixed versions

- PyPI `cbor2`: affected \< 5.9.0; fixed 5.9.0 (osv)
- agronholm cbor2: \< 5.9.0 (cvelist)

## Mitigation

- Upgrade cbor2 to 5.9.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-26209. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-26209.md
Affected: cbor2 < 5.9.0
Fixed in: 5.9.0

Steps:
1. Search this machine and project for cbor2 (PyPI), agronholm cbor2: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-26209 being exploited?

There is no confirmed exploitation: CVE-2026-26209 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.75% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-26209?

High: CVSS 7.5 (v3.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-26209?

cbor2 \< 5.9.0.

### Is there a fix for CVE-2026-26209?

Yes. Fixed in 5.9.0. Upgrade cbor2 to 5.9.0 or later.

### How do I check if I'm affected by CVE-2026-26209?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/agronholm/cbor2/security/advisories/GHSA-3c37-wwvx-h642>
- vendor: <https://github.com/agronholm/cbor2/releases/tag/5.9.0>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-26209>
- patch: <https://github.com/agronholm/cbor2/pull/275>
- patch: <https://github.com/agronholm/cbor2/commit/e61a5f365ba610d5907a0ae1bc72769bba34294b>
- other: <https://github.com/agronholm/cbor2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-26209>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3c37-wwvx-h642> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2123> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-26209> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-26209>
