CVE-2025-64076
Last modified
CVE-2025-64076 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. 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. EPSS estimates a 0.41% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Agronholm | Cbor2 | <= 5.7.0 |
References
- https://github.com/agronholm/cbor2/issues/264Exploit, Issue Tracking
- https://github.com/agronholm/cbor2/pull/265Exploit, Issue Tracking, Patch
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2025-64076?
How severe is CVE-2025-64076?
How do I fix CVE-2025-64076?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-64066Primakon Pi Portal 1.0.18 REST /api/v2/user/register endpoin…8.6
- CVE-2025-64067Primakon Pi Portal 1.0.18 API endpoints responsible for retr…5.3
- CVE-2025-6407A vulnerability, which was classified as critical, was found…9.8
- CVE-2025-64070Sourcecodester Student Grades Management System v1.0 is vuln…5.4
- CVE-2025-64074A path-traversal vulnerability in the logout functionality o…5.3
- CVE-2025-64075A path traversal vulnerability in the check_token function o…10
- CVE-2025-6408A vulnerability has been found in Campcodes Online Hospital …9.8
- CVE-2025-64081SQL injection vulnerability in /php/api_patient_schedule.php…9.8
- CVE-2025-64084An authenticated SQL injection vulnerability exists in Cloud…5.4
- CVE-2025-64085A NULL pointer dereference vulnerability in the importDataOb…7.5
- CVE-2025-64086A NULL pointer dereference vulnerability in the util.readFil…7.5
- CVE-2025-64087A Server-Side Template Injection (SSTI) vulnerability in the…9.8
Are you affected by CVE-2025-64076?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
