CVE-2026-82404: TOON Prototype Pollution When Decoding Untrusted Vulnerability

HIGH
Advisory Identifier: GHSA-p95v-992w-h6c3
CVSS 8.3
CWE-1321
Published
Advisory Summary

CVE-2026-82404 is a HIGH (CVSS 8.3) prototype pollution when decoding untrusted vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting TOON libraries in the npm ecosystem. The issue involves prototype pollution when decoding untrusted toon input. Remediation is available by upgrading affected packages to version 2.3.1.

CVE-2026-82404 at a Glance

CVE Identifier CVE-2026-82404
GHSA Identifier GHSA-p95v-992w-h6c3
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product TOON
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-82404

To remediate this vulnerability, upgrade all affected TOON dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@toon-format/toon fixed: 2.3.1
npm install @toon-format/toon@2.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @toon-format/toon

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-82404, inspect your project dependencies using npm:

npm ls @toon-format/toon

Analyze the terminal output to locate any version of TOON in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.1), your application is affected.

Note: The npm ls @toon-format/toon command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In TOON, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Decoding attacker-controlled TOON containing a `__proto__`, `constructor`, or `prototype` key wrote through the object's prototype chain instead of creating an own property, polluting `Object.prototype` for the whole runtime. The `expandPaths: 'safe'` path (dotted keys such as `a.__proto__.x`) was the strongest vector; plain nested objects, tabular rows, and quoted keys were all affected. The encoder had a matching defect: it silently dropped own `__proto__` properties and could fire an inherited setter while normalizing. ### Impact Any service that decodes untrusted TOON is affected. Prototype pollution can escalate to denial of service or, with a suitable downstream gadget, remote code execution. ### Patches Upgrade to `@toon-format/toon@2.3.1`. Decoders now materialize `__proto__`/`constructor`/`prototype` as ordinary own data properties, matching `JSON.parse` semantics; the encoder preserves the same keys without invoking inherited accessors. ### Workarounds None. Upgrade is the only fix. Callers who cannot upgrade should reject input whose keys include `__proto__`, `constructor`, or `prototype` before decoding. ### Port maintainers The same bug shape can exist in any implementation that assigns decoded keys with `obj[key] = value`. Rust, Swift, Java, Python, and C# ports should audit their object-construction and path-expansion paths for the three prototype keys.

CVE-2026-82404 Affected TOON Versions

1 component(s)
Fixed Versions:
2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
@toon-format/toon
npm
< 2.3.1
2.3.1

References

Frequently Asked Questions

What is CVE-2026-82404?
CVE-2026-82404 is a security vulnerability in TOON involving Prototype pollution when decoding untrusted TOON input under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which TOON versions are affected?
Affected versions include releases prior to 2.3.1 across affected packages: @toon-format/toon.
What version fixes CVE-2026-82404?
Upgrading to 2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @toon-format/toon affected?
Yes, @toon-format/toon is affected in releases prior to 2.3.1. Upgrade your dependency to 2.3.1 or later.
What is the CVSS score of CVE-2026-82404?
CVE-2026-82404 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2026-82404?
CVE-2026-82404 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-82404?
Run the dependency tree command: 'npm ls @toon-format/toon'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p95v-992w-h6c3",
  "modified" : "2026-09-03T19:52:08Z",
  "published" : "2026-09-03T19:52:08Z",
  "aliases" : [ "CVE-2026-82404" ],
  "summary" : "TOON: Prototype pollution when decoding untrusted TOON input",
  "details" : "### Summary\n\nDecoding attacker-controlled TOON containing a `__proto__`, `constructor`, or `prototype` key wrote through the object's prototype chain instead of creating an own property, polluting `Object.prototype` for the whole runtime. The `expandPaths: 'safe'` path (dotted keys such as `a.__proto__.x`) was the strongest vector; plain nested objects, tabular rows, and quoted keys were all affected. The encoder had a matching defect: it silently dropped own `__proto__` properties and could fire an inherited setter while normalizing.\n\n### Impact\n\nAny service that decodes untrusted TOON is affected. Prototype pollution can escalate to denial of service or, with a suitable downstream gadget, remote code execution.\n\n### Patches\n\nUpgrade to `@toon-format/toon@2.3.1`. Decoders now materialize `__proto__`/`constructor`/`prototype` as ordinary own data properties, matching `JSON.parse` semantics; the encoder preserves the same keys without invoking inherited accessors.\n\n### Workarounds\n\nNone. Upgrade is the only fix. Callers who cannot upgrade should reject input whose keys include `__proto__`, `constructor`, or `prototype` before decoding.\n\n### Port maintainers\n\nThe same bug shape can exist in any implementation that assigns decoded keys with `obj[key] = value`. Rust, Swift, Java, Python, and C# ports should audit their object-construction and path-expansion paths for the three prototype keys.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@toon-format/toon"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/toon-format/toon/security/advisories/GHSA-p95v-992w-h6c3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-82404"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/toon-format/toon/pull/316"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/toon-format/toon/commit/94a2b7560b2b5ed903a4d466a3bce8b13daa2660"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/toon-format/toon"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/toon-format/toon/releases/tag/v2.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-03T19:52:08Z",
    "nvd_published_at" : "2026-09-02T17:18:00Z"
  }
}