# CVE-2025-64076: cbor2 C extension decoder flaws can cause denial of service

- Severity: High 7.5 (CVSS:3.1, scored by mitre) `CVSS:3.1/AC:L/AV:N/A:H/C:N/I:N/PR:N/S:U/UI:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-11-18T00:00:00.000Z
- Modified: 2026-11-05T14:10:00.273Z
- Also known as: GHSA-9q9c-vjxh-p795, PYSEC-2025-238
- Weaknesses: CWE-191
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: mitre

## Description

Multiple vulnerabilities exist in cbor2 through version 5.7.0 in the decode_definite_long_string() function of the C extension decoder (source/decoder.c): (1) Integer Underflow Leading to Out-of-Bounds Read (CWE-191, CWE-125): An incorrect variable reference and missing state reset in the chunk processing loop causes buffer_length to not be reset to zero after UTF-8 character consumption. This results in subsequent chunk_length calculations producing negative values (e.g., chunk_length = 65536 - buffer_length), which are passed as signed integers to the read() method, potentially triggering unlimited read operations and resource exhaustion. (2) Memory Leak via Missing Reference Count Release (CWE-401): The main processing loop fails to release Python object references (Py_DECREF) for chunk objects allocated in each iteration. For CBOR strings longer than 65536 bytes, this causes cumulative memory leaks proportional to the payload size, enabling memory exhaustion attacks through repeated processing of large CBOR payloads. Both vulnerabilities can be exploited remotely without authentication by sending specially-crafted CBOR data containing definite-length text strings with multi-byte UTF-8 characters positioned at 65536-byte chunk boundaries. Successful exploitation results in denial of service through process crashes (CBORDecodeEOF exceptions) or memory exhaustion. The vulnerabilities affect all applications using cbor2's C extension to process untrusted CBOR data, including web APIs, IoT data collectors, and message queue processors. Fixed in commit 851473490281f82d82560b2368284ef33cf6e8f9 pushed with released version 5.7.1.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- cbor2 (PyPI): before 5.7.1
- agronholm cbor2: up to 5.7.0

## Every score

- mitre: CVSS:3.1 7.5 High `CVSS:3.1/AC:L/AV:N/A:H/C:N/I:N/PR:N/S:U/UI:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/agronholm/cbor2/issues/264> (exploit, issue-tracking, report, web)
- <https://github.com/agronholm/cbor2/pull/265> (exploit, fix, issue-tracking, patch, web)
- <https://github.com/agronholm/cbor2/commit/851473490281f82d82560b2368284ef33cf6e8f9> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-64076> (advisory)
- <https://github.com/agronholm/cbor2> (package)
- <https://github.com/agronholm/cbor2/releases/tag/5.7.1> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/cbor2/PYSEC-2025-238.yaml> (web)
- <https://github.com/advisories/GHSA-9q9c-vjxh-p795> (advisory)

## Sources

- CVE List: [CVE-2025-64076](https://www.cve.org/CVERecord?id=CVE-2025-64076), CVE Terms of Use, modified 2025-11-19
- GitHub Advisory Database: [GHSA-9q9c-vjxh-p795](https://github.com/advisories/GHSA-9q9c-vjxh-p795), CC-BY-4.0, modified 2026-09-01
- NVD: [CVE-2025-64076](https://nvd.nist.gov/vuln/detail/CVE-2025-64076), Public domain, modified 2026-11-05
- PyPA Advisory Database: [PYSEC-2025-238](https://osv.dev/vulnerability/PYSEC-2025-238), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2025-64076 · Whole record: https://cve.day/CVE-2025-64076.json · Rebuilt by cve.day 2026-11-25T22:59:07.790Z
