CVE-2025-68131 CBORDecoder reuse can leak shareable values across decode calls
Reusing a CBORDecoder instance allows attackers to read data from previous messages via shared references, leaking sensitive information across trust boundaries.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-68131?
CVE-2025-68131 is a medium-severity vulnerability in agronholm cbor2, published on 31 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-212
Which versions are affected by CVE-2025-68131?
3 open source packages ship an affected version, including cbor2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
cbor2 PyPI | From 3.0.0 | 5.8.0 |
cbor2 PyPI | From 3.0.0 | 5.8.0 |
cbor2 PyPI | From 3.0.0 | 5.8.0 |
Linux distribution packages (1)
python-cbor2 openSUSE:Tumbleweed | All versions | 5.8.0-2.1 |
Products include Agronholm Cbor2.
How do I fix CVE-2025-68131?
Upgrade cbor2 to 5.8.0 or later.
Is CVE-2025-68131 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68131 exists.
Other vulnerabilities in agronholm cbor2
Sources
Also known as AZL-73325, DEBIAN-CVE-2025-68131, GHSA-wcj4-jw5j-44wh, PYSEC-2025-90, ROOT-APP-PYPI-CVE-2025-68131, UBUNTU-CVE-2025-68131 and 1 more.