CVE catalog

CVE-2026-26209

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 unco

[CVE catalog]

Severity
High · CVSS 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.40% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiancbor2sid6.1.2-2fixed
Debiancbor2forky6.1.2-2fixed
Debiancbor2trixie5.6.5-1vulnerable
Debiancbor2bookworm5.4.6-1vulnerable
Pipcbor2Not reported5.9.0fixed
Cpecbor2Not reportedNot reportedvulnerable
PyPIcbor2Not reported5.9.0fixed
Opensusepython-cbor2tumbleweed5.9.0-1.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancbor2sourcesid5.9.0-1not yet assignedNot reportedNot reported
Debiancbor2sourceforky5.9.0-1not yet assignedNot reportedNot reported
Debiancbor2sourcetrixie(unfixed)not yet assignedNot reportedNot reported
Debiancbor2sourcebookworm(unfixed)not yet assignedNot reportedNot reported
Pipcbor2pipNot reported5.9.0Not reportedNot reportedNot reported
PyPIcbor2PyPINot reported5.9.0Not reportedGHSA-3C37-WWVX-H642Not reported
Opensusepython-cbor2rpmtumbleweed5.9.0-1.1Not reportedOPENSUSE-SU-2026:10425-1Not reported

Notes

[trixie] cbor2: Minor issue [bookworm] cbor2: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [python3-cbor2]Affected

    Source package: [cbor2]

    Details (2)
    • 5.4.6-1+b1 · amd64 · bookworm

      Affected

      nvd · cbor2 · debian · bookworm; nvd · cbor2 · debian · 12

    • 5.4.6-1+b1 · arm64 · bookworm

      Affected

      nvd · cbor2 · debian · bookworm; nvd · cbor2 · debian · 12

  • Source package: [cbor2]

    Details (2)
    • 5.4.6-1 · all · bookworm

      Affected

      nvd · cbor2 · debian · bookworm; nvd · cbor2 · debian · 12

    • 5.4.6-1 · all · bookworm

      Affected

      nvd · cbor2 · debian · bookworm; nvd · cbor2 · debian · 12

[Debian 13 (Trixie)]

  • [python3-cbor2]Affected

    Source package: [cbor2]

    Details (4)
    • 5.6.5-1 · amd64 · trixie

      Affected

      nvd · cbor2 · debian · 13

    • 5.6.5-1 · arm64 · trixie

      Affected

      nvd · cbor2 · debian · 13

    • 5.9.0-2~bpo13+2 · amd64 · trixie-backports

      Affected

      nvd · cbor2 · debian · 13

    • 5.9.0-2~bpo13+2 · arm64 · trixie-backports

      Affected

      nvd · cbor2 · debian · 13

  • Source package: [cbor2]

    Details (4)
    • 5.6.5-1 · all · trixie

      Affected

      nvd · cbor2 · debian · 13

    • 5.6.5-1 · all · trixie

      Affected

      nvd · cbor2 · debian · 13

    • 5.9.0-2~bpo13+2 · all · trixie-backports

      Affected

      nvd · cbor2 · debian · 13

    • 5.9.0-2~bpo13+2 · all · trixie-backports

      Affected

      nvd · cbor2 · debian · 13

[openSUSE Tumbleweed]

  • Source package: [python-cbor2]

    Details (1)
    • 5.9.0-1.5 · x86_64 · tumbleweed

      Unknown · Fixed: 5.9.0-1.1

      Version impact unknown

      nvd · python-cbor2 · opensuse · tumbleweed

  • Source package: [python-cbor2]

    Details (1)
    • 5.9.0-1.5 · x86_64 · tumbleweed

      Unknown · Fixed: 5.9.0-1.1

      Version impact unknown

      nvd · python-cbor2 · opensuse · tumbleweed

Observed:

References