UBUNTU-CVE-2025-64076

Source
https://ubuntu.com/security/CVE-2025-64076
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-64076.json
JSON Data
https://api.test.osv.dev/v1/vulns/UBUNTU-CVE-2025-64076
Upstream
Published
2025-11-18T18:16:00Z
Modified
2026-01-20T20:08:11.704159Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
  • Ubuntu - medium
Summary
[none]
Details

Multiple vulnerabilities exist in cbor2 through version 5.7.0 in the decodedefinitelongstring() 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 bufferlength to not be reset to zero after UTF-8 character consumption. This results in subsequent chunklength calculations producing negative values (e.g., chunklength = 65536 - bufferlength), 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 (PyDECREF) 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.

References

Affected packages

Ubuntu:22.04:LTS / cbor2

Package

Name
cbor2
Purl
pkg:deb/ubuntu/cbor2@5.4.2-1build1?arch=source&distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

5.*
5.2.0-4
5.2.0-4build1
5.4.2-1
5.4.2-1build1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "5.4.2-1build1",
            "binary_name": "python3-cbor2"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-64076.json"

Ubuntu:24.04:LTS / cbor2

Package

Name
cbor2
Purl
pkg:deb/ubuntu/cbor2@5.6.2-1build1?arch=source&distro=noble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

5.*
5.4.6-2
5.4.6-2build1
5.5.1-1
5.6.0-1
5.6.1-1
5.6.2-1
5.6.2-1build1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "5.6.2-1build1",
            "binary_name": "python3-cbor2"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-64076.json"

Ubuntu:25.10 / cbor2

Package

Name
cbor2
Purl
pkg:deb/ubuntu/cbor2@5.6.5-1build1?arch=source&distro=questing

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

5.*
5.6.5-1build1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "5.6.5-1build1",
            "binary_name": "python3-cbor2"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-64076.json"