cve.bz

CVE-2025-64076 agronholm cbor2: Integer Underflow (Wrap or Wraparound)

7.5 highExploit referenceEPSS 0.5%Fix available

High (7.5) in agronholm cbor2. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in cbor2 5.7.1.

On this page
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.

Severity

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
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 43rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-11-19. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-191 Integer Underflow (Wrap or Wraparound)
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-64076 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-64076?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-64076?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-64076 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
agronholm:cbor2through 5.7.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-9q9c-vjxh-p795PyPIcbor2<5.7.15.7.1
PYSEC-2025-238PyPIcbor2<5.7.15.7.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13cbor2no fix listedDEBIAN-CVE-2025-64076
Debian14cbor25.7.1-1DEBIAN-CVE-2025-64076
Ubuntu22.04:LTS, 24.04:LTS, 25.10cbor2no fix listedUBUNTU-CVE-2025-64076
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0python-cbor25.6.5-160000.3.1SUSE-SU-2025:21168-1
openSUSELeap 16.0python-cbor25.6.5-160000.3.1openSUSE-SU-2025:20133-1
Azure Linux3python-cbor2no fix listedAZL-70516

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This flaw is marked IMPORTANT because the highest threat of this flaw is to system availability, as successful exploitation can lead to denial of service through process crashes or memory exhaustion.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-64076.

References

Check your stackJSON