Skip to content
Threat Feed
high threat exploited

Prototype Pollution in @toon-format/toon

The @toon-format/toon library fails to sanitize input, allowing attackers to pollute the Object prototype via __proto__, constructor, or prototype keys, which can lead to denial of service or remote code execution.

CVE search metadata

CVE search record: CVE-2026-82404. Severity: high. CVSS: 8.3. KEV: no. Product: toon (< 2.3.1). Brief: Prototype Pollution in @toon-format/toon. Brief link: https://feed.craftedsignal.io/briefs/2026-09-toon-prototype-pollution/

The TOON format library, specifically @toon-format/toon versions prior to 2.3.1, is vulnerable to prototype pollution when decoding untrusted input. The flaw arises because the library's decoder fails to differentiate between own properties and inherited properties when parsing objects. An attacker supplying input containing __proto__, constructor, or prototype keys can cause the library to write these keys into the JavaScript Object.prototype.

This behavior affects both the expandPaths: 'safe' path, which handles dotted keys, and standard nested objects, tabular rows, or quoted keys. Furthermore, the encoder is also defective, silently dropping legitimate own __proto__ properties and potentially triggering inherited setters during normalization. Successful exploitation allows for the alteration of the runtime environment, which can be leveraged to cause application crashes (denial of service) or, if the application environment contains reachable gadgets, remote code execution. No workarounds exist for this vulnerability; users must upgrade to version 2.3.1 or later.

Impact

Any service that decodes untrusted TOON input is vulnerable to this prototype pollution attack. Depending on the downstream logic of the host application, this vulnerability can lead to critical security outcomes, including service disruption through denial of service or full system compromise via remote code execution by leveraging gadget chains. The library is commonly used for data interchange, making the scope of potential exploitation wide for any application relying on this package for serialization or deserialization tasks.

Recommendation

  • Upgrade the @toon-format/toon package to version 2.3.1 or later to remediate CVE-2026-82404.
  • Implement a pre-decoding validation step to inspect input for the presence of 'proto', 'constructor', or 'prototype' keys if an immediate upgrade is not possible.
  • Audit other implementations or language ports of the TOON format (such as those in Rust, Swift, Java, Python, or C#) for similar unsafe object-construction patterns where keys are assigned directly to objects without validation.

Immediate actions

Upgrade @toon-format/toon to 2.3.1

Development 72h

Mitigations

Implement input validation to block input containing __proto__, constructor, or prototype

immediate Development

CVE-2026-82404