# 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.

- **Severity:** Medium 5.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Dec 2025
- **Updated:** 2 Jan 2026
- **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, openSUSE-SU-2026:10014-1

## 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 (Improper Removal of Sensitive Information Before Storage or Transfer)

## Which versions are affected by CVE-2025-68131?

3 open source packages ship an affected version, including cbor2. It affects 1 product.


| Package | Ecosystem | 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 |
| `python-cbor2` | openSUSE:Tumbleweed | All versions | 5.8.0-2.1 |

Products: 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

- [CVE-2026-26209](https://insights.sbomify.com/CVE-2026-26209/): cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads (high 7.5)
- [CVE-2025-64076](https://insights.sbomify.com/CVE-2025-64076/): cbor2 C extension decoder flaws can cause denial of service (high 7.5)
- [CVE-2024-26134](https://insights.sbomify.com/CVE-2024-26134/): CBOR2 decoder has potential buffer overflow (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-68131 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68131 exists.

Affected packages and fixed versions:
- cbor2 (PyPI): affected from 3.0.0; fixed in 5.8.0
- cbor2 (PyPI): affected from 3.0.0; fixed in 5.8.0
- cbor2 (PyPI): affected from 3.0.0; fixed in 5.8.0

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-68131/ (Markdown: https://insights.sbomify.com/CVE-2025-68131/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-68131
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-68131
- OSV: https://osv.dev/vulnerability/CVE-2025-68131

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-68131/
Summaries are generated and may contain mistakes; the official description above is the record.
