CVE-2026-82404
niche1Prototype Pollution in TOON npm Serialization Library
TOON, an npm library for compact, human-readable serialization of JSON-like data used in LLM prompts, is vulnerable to prototype pollution (CWE-1321): before version 2.3.1, decoding attacker-controlled TOON containing __proto__, constructor, or prototype keys wrote through the object prototype chain and polluted Object.prototype for the entire runtime instead of creating an own property. The strongest vector is dotted keys such as a.__proto__.x handled by the expandPaths 'safe' path and insertPathSafe function, while plain nested objects, tabular rows, quoted keys, and streaming decode are also affected, and the encoder additionally drops own __proto__ properties and can invoke an inherited setter during normalization. An attacker who can feed crafted TOON to a decoding service gains denial of service in any application, and potentially remote code execution when a suitable downstream gadget is present. No public proof-of-concept, CISA KEV listing, or known in-the-wild exploitation is reported, and EPSS currently estimates only a 0.4% probability of exploitation within 30 days.
What to do: Upgrade the toon npm package to version 2.3.1 or later. Audit whether your services decode TOON from untrusted sources (e.g., user-supplied or model-generated prompt data), and until patched, strip or reject keys named __proto__, constructor, or prototype, or decode into null-prototype objects with schema validation. Also review downstream code (merge/mass-assignment patterns) for gadgets that could escalate Object.prototype pollution into remote code execution.
| TOON project (npm package: toon) TOON (decoder and encoder) | all versions prior to 2.3.1 (fixed in 2.3.1) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
TOON is a compact, human-readable serialization of JSON data for LLM prompts. Prior to 2.3.1, decoding attacker-controlled TOON with a __proto__, constructor, or prototype key wrote through the object prototype chain instead of creating an own property, polluting Object.prototype for the runtime. In packages/toon/src/decode/expand.ts, the expandPaths: 'safe' path and insertPathSafe function made dotted keys such as a.__proto__.x the strongest vector, while plain nested objects, tabular rows, quoted keys, and streaming decode were also affected. The encoder also dropped own __proto__ properties and could invoke an inherited setter during normalization. Services that decode untrusted TOON could experience denial of service or, when a suitable downstream gadget is present, remote code execution. This issue is fixed in version 2.3.1.
- Ecosystems
- npm
- Weakness
- CWE-1321
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
- GHSA
- GHSA-p95v-992w-h6c3 (high)
In the news0 stories
No ingested article mentions this CVE yet.