Skip to main content
VulnerabilityPublished

CVE-2026-26209: agronholm cbor2 · Uncontrolled Recursion

Affects agronholm cbor2Source CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.5 High : upgrade to 5.9.0 soon.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 3.0 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 33% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.9.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 23 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Upgrade agronholm cbor2 to 5.9.0.

Affected software

ProductAffectedFixed in
agronholmcbor2Affected
  • <5.9.0
Fixed in
  • 5.9.0
PyPIcbor2pkg:pypi/cbor2Other threatsAffected
  • <5.9.0
Fixed in
  • 5.9.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

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

Description

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

References

Community reviews

Loading reviews…