{"answers":{"affected":"3 open source packages ship an affected version, including cbor2. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64076 exists.","fix":"Upgrade cbor2 to 5.7.1 or later.","what":"CVE-2025-64076 is a high-severity vulnerability in n/a, published on 18 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-64076 and fix it if it is affected.\n\nWhat it is: CVE-2025-64076 is a high-severity vulnerability in n/a, published on 18 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64076 exists.\n\nAffected packages and fixed versions:\n- cbor2 (PyPI): affected all versions; fixed in 5.7.1\n- cbor2 (PyPI): affected all versions; fixed in 5.7.1\n- cbor2 (PyPI): affected all versions; fixed in 5.7.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-64076/ (Markdown: https://insights.sbomify.com/CVE-2025-64076/index.md)","id":"CVE-2025-64076","markdown":"https://insights.sbomify.com/CVE-2025-64076/index.md","name":"CVE-2025-64076","record":{"aliases":["AZL-70516","DEBIAN-CVE-2025-64076","GHSA-9q9c-vjxh-p795","PYSEC-2025-238","UBUNTU-CVE-2025-64076"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Python CBOR library","requires_auth":"none","summary":"Remote attackers can cause denial of service via crashes or memory exhaustion by sending crafted CBOR data to applications using the cbor2 library.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"cbor2","vendor":"agronholm"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AC:L/AV:N/A:H/C:N/I:N/PR:N/S:U/UI:N","version":"3.1"},"cwes":[{"id":"CWE-191","name":"Integer Underflow (Wrap or Wraparound)"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"cbor2 C extension decoder flaws can cause denial of service","id":"CVE-2025-64076","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"integer_overflow","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"SQL injection in n/a","id":"CVE-2025-64081"},"packages":[{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"cbor2","purl":null,"source":"GHSA-9q9c-vjxh-p795"},{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"cbor2","purl":"pkg:pypi/cbor2","source":"GHSA-9q9c-vjxh-p795"},{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"cbor2","purl":"pkg:pypi/cbor2","source":"PYSEC-2025-238"}],"prev":{"headline":"Path traversal in n/a","id":"CVE-2025-64075"},"products":["n/a"],"published":"2025-11-18","related":[{"cvss_score":7.5,"headline":"cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads","id":"CVE-2026-26209","kev_date_added":null,"published":"2026-03-23"},{"cvss_score":7.5,"headline":"CBOR2 decoder has potential buffer overflow","id":"CVE-2024-26134","kev_date_added":null,"published":"2024-02-19"},{"cvss_score":5.5,"headline":"CBORDecoder reuse can leak shareable values across decode calls","id":"CVE-2025-68131","kev_date_added":null,"published":"2025-12-31"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-19","vendors":["n/a"]},"summary":"Remote attackers can cause denial of service via crashes or memory exhaustion by sending crafted CBOR data to applications using the cbor2 library.","url":"https://insights.sbomify.com/CVE-2025-64076/"}