StableLib
StableLib: Prototype poisoning via `__proto__` map keys in CBOR decoding
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.0.4
Fixed in 2.0.4
Mitigation
Upgrade stablelib to 2.0.4 or later.
References
- Vendor advisory github.com/StableLib/stablelib/security/adviso…
- Patch github.com/StableLib/stablelib/commit/0f153a63…
- Release notes github.com/StableLib/stablelib/releases/tag/@s…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.