StableLib cbor: Prototype pollution via __proto__ map keys in CBOR decoding
Summary
The @stablelib/cbor npm package for JavaScript and TypeScript creates ordinary objects when decoding CBOR maps and assigns attacker-controlled keys with bracket assignment. A map key named __proto__ sets the inherited prototype instead of an own property, so attacker-supplied values can appear as inherited properties of the decoded object. An attacker who can send crafted CBOR data to an application that trusts inherited properties or merges the decoded object can influence security decisions, such as authorization or feature flags. CISA SSVC data lists exploitation as none and automatable as no.
Affected
- @stablelib/cbor versions before 2.0.4 (CVE record and OSV)
- Note: the GitHub advisory mirror lists the fix as 2.0.3; the conflict is unresolved, so treat 2.0.4 as the minimum
Fixed in
- Version 2.0.4 (per CVE record and release tag)
- Version 2.0.5 is the latest published release; upgrade to it
Workaround
- No vendor workaround; upgrading is the fix
- If an upgrade is not possible at once: do not trust inherited properties on decoded data, check own properties explicitly, and reject or strip __proto__ keys at the input boundary
Exploitation
- CISA SSVC: exploitation none, automatable no
- Not listed in the CISA KEV catalogue
- No public proof of concept found; no known active exploitation
Our recommendation
- Run npm ls @stablelib/cbor across all Node.js projects and lockfiles
- Upgrade affected projects to 2.0.5 or the latest release, not only to 2.0.4
- Prioritise internet-facing services that decode CBOR from untrusted sources and use the result for access control
- Review code that merges decoded objects or relies on inherited properties
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub security advisory GHSA-w48f-fwg7-ww6p github.com
- Release @stablelib/cbor@2.0.4 github.com
- Fix commit 0f153a6 github.com
- OSV vulnerability record osv.dev
- OpenCVE CVE record app.opencve.io
- GHSA mirror (GitLab Advisory Database) advisories.gitlab.com
- npm package @stablelib/cbor www.npmjs.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 08:35.
Original description (NVD)
StableLib is a stable library of useful TypeScript and JavaScript code. Prior to 2.0.4, the @stablelib/cbor CBOR map decoding path creates ordinary JavaScript objects and assigns attacker-controlled keys with bracket assignment. A map key named __proto__ invokes the inherited prototype setter instead of creating an ordinary own property, allowing the decoded object's prototype to contain attacker-controlled authorization or feature-flag values. Downstream code that trusts normal property lookup or merges the decoded object can therefore make security-sensitive decisions using inherited attacker data. This issue is fixed in version 2.0.4.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
