CVE-2025-64076
7.5Agronholm · cbor2
The cbor2 library is vulnerable to integer underflow and memory leak flaws in its C extension decoder, allowing remote attackers to cause resource exhaustion via crafted CBOR payloads.
Executive summary
The cbor2 library is affected by multiple memory management vulnerabilities that allow unauthenticated remote attackers to cause denial of service through resource exhaustion.
Vulnerability
The vulnerability exists in the decode_definite_long_string function within the C extension decoder, where integer underflow leads to out of bounds reads and missing reference count releases cause memory leaks. These flaws can be triggered by an unauthenticated attacker sending a specially crafted CBOR payload containing definite length text strings.
Business impact
The identified vulnerabilities pose a significant threat to system availability, as they allow for remote denial of service attacks without requiring authentication. With a CVSS score of 7.5, the impact is considered High, as successful exploitation can crash applications or exhaust system memory, potentially leading to widespread service outages for any infrastructure relying on cbor2 for data serialization.
Remediation
Immediate Action: Update the cbor2 library to a version containing the fix, such as those incorporating commit 071a165e16ef5036534bfbf38d310d3fc3029805 or subsequent releases.
Proactive Monitoring: Monitor application logs and system resource usage metrics for anomalous spikes in memory consumption or unexpected process restarts associated with CBOR decoding tasks.
Compensating Controls: Implement input validation or size limits on incoming CBOR payloads at the application gateway or load balancer level to drop excessively large or malformed strings before they reach the decoding logic.
Exploitation status
Public Exploit Available: Unknown.
Analyst recommendation
Given the High severity of this vulnerability and the potential for remote denial of service, organizations must prioritize updating the cbor2 library to the patched version. Administrators should review their software bill of materials to identify all applications utilizing affected versions of cbor2 and schedule maintenance windows to apply the necessary security updates immediately.