Vulnerability · Published Dec 31, 2025 · Assigned by GitHub_M
CVE-2025-68131CBORDecoder reuse can leak shareable values across decode calls
Medium 5.5
In plain English
A medium-severity security flaw in cbor2 from agronholm. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 40% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) serialization format. Starting in version 3.0.0 and prior to version 5.8.0, whhen a CBORDecoder instance is reused across multiple decode operations, values marked with the shareable tag (28) persist in memory and can be accessed by subsequent CBOR messages using the sharedref tag (29). This allows an attacker-controlled message to read data from previously decoded messages if the decoder is reused across trust boundaries. Version 5.8.0 patches the issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | cbor2 | no fix listed | DEBIAN-CVE-2025-68131 |
| Debian:13 | cbor2 | no fix listed | DEBIAN-CVE-2025-68131 |
| Debian:14 | cbor2 | 5.8.0-1 | DEBIAN-CVE-2025-68131 |
| PyPI | cbor2 | 5.8.0 | GHSA-wcj4-jw5j-44wh |
| PyPI | cbor2 | 5.8.0 | PYSEC-2025-90 |
| Ubuntu:22.04:LTS | cbor2 | no fix listed | UBUNTU-CVE-2025-68131 |
| Ubuntu:24.04:LTS | cbor2 | no fix listed | UBUNTU-CVE-2025-68131 |
| Ubuntu:25.10 | cbor2 | no fix listed | UBUNTU-CVE-2025-68131 |
| Ubuntu:26.04:LTS | cbor2 | no fix listed | UBUNTU-CVE-2025-68131 |
| Ubuntu:26.10 | cbor2 | no fix listed | UBUNTU-CVE-2025-68131 |
Affected products (as reported)
Weakness: CWE-212 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
References
- https://github.com/agronholm/cbor2/security/advisories/GHSA-wcj4-jw5j-44wh x_refsource_CONFIRM
- https://github.com/agronholm/cbor2/pull/268 x_refsource_MISC