CBORDecoder reuse can leak shareable values across decode calls
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-68131
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 13:08 UTC · Revision 1
Source evidence
CBORDecoder reuse can leak shareable values across decode calls
core-osv · Original sourcePublished 31 Dec 2025, 01:15 UTC
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.
osv:CVE-2025-68131
Complete source record
{
"id": "631b139009b890fadc70be900d76ba8ad806b799ecc6e84f70c04d0837a63ba9",
"url": "https://osv.dev/vulnerability/CVE-2025-68131",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CBORDecoder reuse can leak shareable values across decode calls",
"summary": "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.",
"evidence": "osv:CVE-2025-68131",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2025-68131",
"aliases": [
"CVE-2025-68131",
"GHSA-wcj4-jw5j-44wh",
"PYSEC-2025-90"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/agronholm/cbor2",
"type": "GIT",
"events": [
{
"introduced": "ff91251d4c19e8c6d2298c52e664c599298f326e"
},
{
"fixed": "c77cea8e0d77aebdb6eea051433352a1de824ff1"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "5.8.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:agronholm:cbor2:*:*:*:*:*:python:*:*",
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "5.8.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"5.7.1",
"5.7.0",
"5.6.5",
"5.6.4",
"5.6.3",
"5.6.2",
"5.6.1",
"5.6.0",
"5.5.1",
"5.5.0",
"5.4.6",
"5.4.5",
"5.4.4",
"5.4.3",
"5.4.2.post1",
"5.2.0",
"5.4.2",
"5.4.1",
"5.4.0",
"5.3.0",
"5.1.2",
"5.1.1",
"5.1.0",
"5.0.1",
"5.0.0",
"4.2.0",
"4.1.2",
"4.1.1",
"4.1.0",
"4.0.1",
"4.0.0",
"3.0.4",
"3.0.3",
"3.0.2",
"3.0.1",
"3.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68131.json"
}
}
],
"modified": "2026-10-28T02:30:28.950612230Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68131.json",
"https://github.com/agronholm/cbor2/security/advisories/GHSA-wcj4-jw5j-44wh",
"https://nvd.nist.gov/vuln/detail/CVE-2025-68131",
"https://github.com/agronholm/cbor2/pull/268"
],
"provider_metadata": {
"cwe_ids": [
"CWE-212"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68131.json"
}
},
"related_cves": [
{
"value": "CVE-2025-68131",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 495696,
"published_at": "2025-12-31T01:15:36.827+00:00"
}