Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-64076: n/a

0
High
VulnerabilityCVE-2025-64076cvecve-2025-64076
Published: Tue Nov 18 2025 (11/18/2025, 00:00:00 UTC)
Source: CVE Database V5

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.

AI-Powered Analysis

AILast updated: 11/25/2025, 19:12:58 UTC

Technical Analysis

CVE-2025-64076 identifies two critical vulnerabilities in the cbor2 Python library's C extension decoder, specifically within the decode_definite_long_string() function. The first issue is an integer underflow caused by an incorrect variable reference and missing state reset in the chunk processing loop. This leads to the buffer_length variable not being reset after consuming UTF-8 characters, causing chunk_length calculations to produce negative values. These negative values are passed as signed integers to the read() method, potentially triggering out-of-bounds reads and unlimited read operations, which can exhaust system resources. The second issue is a memory leak due to the failure to release Python object references (Py_DECREF) for chunk objects allocated in each iteration of the processing loop. For CBOR strings exceeding 65536 bytes, this leak accumulates proportionally to the payload size, enabling memory exhaustion attacks. 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 (manifesting as CBORDecodeEOF exceptions) or memory exhaustion. This affects any application using cbor2's C extension to process untrusted CBOR data, such as web APIs, IoT data collectors, and message queue processors. The vulnerabilities were addressed and fixed in cbor2 version 5.7.1, which resets buffer_length correctly and ensures proper reference count management to prevent memory leaks.

Potential Impact

For European organizations, the impact of CVE-2025-64076 is significant, especially for those relying on cbor2 for processing CBOR-encoded data in critical infrastructure, IoT deployments, or cloud-based APIs. Exploitation can lead to denial of service conditions, causing application crashes or memory exhaustion, which disrupts service availability and may impact operational continuity. In sectors such as healthcare, manufacturing, and smart city infrastructure, where IoT data collectors and message queues are prevalent, these disruptions could have cascading effects on safety and productivity. Additionally, denial of service attacks could be leveraged as part of multi-vector campaigns targeting European enterprises, potentially amplifying the impact on critical services. Since exploitation requires no authentication or user interaction, attackers can remotely trigger these conditions by sending malicious CBOR payloads, increasing the risk of widespread exploitation if vulnerable systems are exposed to untrusted data sources.

Mitigation Recommendations

European organizations should immediately upgrade all instances of the cbor2 library to version 5.7.1 or later, which contains the fixes for these vulnerabilities. For environments where immediate upgrade is not feasible, implement strict input validation and filtering to block or sanitize CBOR payloads containing large definite-length text strings with multi-byte UTF-8 characters, especially those near 65536-byte chunk boundaries. Deploy runtime application monitoring to detect abnormal memory usage patterns or frequent CBORDecodeEOF exceptions indicative of exploitation attempts. Network-level protections such as Web Application Firewalls (WAFs) or Intrusion Prevention Systems (IPS) should be configured to detect and block suspicious CBOR traffic patterns. Additionally, isolate systems processing untrusted CBOR data within segmented network zones to limit potential impact. Regularly audit dependencies and maintain an up-to-date software bill of materials (SBOM) to quickly identify and remediate vulnerable library versions. Finally, educate development and security teams about the risks associated with CBOR data processing and the importance of timely patching.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
mitre
Date Reserved
2025-10-27T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 691cb50331331b1c393fbbe2

Added to database: 11/18/2025, 6:03:47 PM

Last enriched: 11/25/2025, 7:12:58 PM

Last updated: 1/7/2026, 9:23:30 AM

Views: 60

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats