{"id":"CVE-2026-106448","aliases":["CVE-2026-106448","GHSA-w48f-fwg7-ww6p"],"related":[],"kind":"vulnerability","state":"published","title":"StableLib: Prototype poisoning via `__proto__` map keys in CBOR decoding","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`@stablelib/cbor` decodes CBOR maps into ordinary JavaScript objects and assigns attacker-controlled keys directly onto those objects. A CBOR map key named `__proto__` therefore changes the prototype of the decoded object instead of becoming an ordinary data property.\n\n### Details\n\nThe decoder builds map results with a plain `{}` and then stores attacker-controlled keys using bracket assignment.\n\nThat is unsafe for special property names. In JavaScript, assigning to `obj[\"__proto__\"]` on a normal object does not create a plain own property. It invokes the built-in `__proto__` setter and replaces the object’s prototype if the supplied value is an object or `null`.\n\nAs a result, a CBOR payload containing a map entry like:\n\n* key: `\"__proto__\"`\n* value: `{ isAdmin: true }`\n\ndoes not decode to an object with an own property called `__proto__`. It decodes to an object whose prototype is now attacker-controlled. Any code that later reads properties through normal lookup will see inherited attacker-supplied values.\n\n### PoC\n\n```js\nimport { decode } from \"@stablelib/cbor\";\n\n// CBOR:\n// {\n//   \"__proto__\": { \"isAdmin\": true }\n// }\n//\n// a1                    map(1)\n//   69                  text(9)\n//     \"__proto__\"\n//   a1                  map(1)\n//     67                text(7)\n//       \"isAdmin\"\n//     f5                true\n\nconst payload = new Uint8Array([\n  0xa1,\n  0x69, 0x5f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x5f,\n  0xa1,\n  0x67, 0x69, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e,\n  0xf5\n]);\n\nconst obj = decode(payload);\n\nconsole.log(Object.hasOwn(obj, \"isAdmin\")); // false\nconsole.log(obj.isAdmin);                   // true\nconsole.log(Object.getPrototypeOf(obj).isAdmin); // true\n```\n\n### Impact\n\nAny application that decodes untrusted CBOR into JavaScript objects can receive objects with attacker-controlled prototypes.\n\nIn practice, that can corrupt configuration objects, influence authorization checks, alter feature flags, and break application logic that relies on normal property lookup instead of strict own-property checks. If the decoded object is later merged into other objects, the impact can spread further.\n\n### Solution\n\nUpgrade to version 2.0.4.","format":"markdown","source":"ghsa"}],"published":"2026-04-04T04:24:27.000Z","modified":"2026-10-07T17:16:47.727Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","score":8.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","rating":"HIGH"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":"< 2.0.4","status":"affected"}],"vendor":"StableLib","product":"stablelib","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.3"}],"ecosystem":"npm","package":"@stablelib/cbor","purl":"pkg:npm/%40stablelib/cbor","source":"ghsa"}],"references":[{"url":"https://github.com/StableLib/stablelib/security/advisories/GHSA-w48f-fwg7-ww6p","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/StableLib/stablelib/commit/0f153a63b7552a0e8721f640984113e419015026","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/StableLib/stablelib/releases/tag/@stablelib/cbor@2.0.4","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/StableLib/stablelib","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-07T15:27:16.755Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-106448","url":"https://www.cve.org/CVERecord?id=CVE-2026-106448","licence":"CVE Terms of Use","modified":"2026-10-07T17:07:38.703Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w48f-fwg7-ww6p","url":"https://github.com/advisories/GHSA-w48f-fwg7-ww6p","licence":"CC-BY-4.0","modified":"2026-10-07T10:56:10.181Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-106448","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-106448","licence":"Public domain","modified":"2026-10-07T17:16:47.727Z"}],"updatedAt":"2026-11-25T22:59:42.511Z","epss":{"score":0.00401,"percentile":0.36451,"date":"2026-12-01T12:00:22.000Z"}}