---
id: CVE-2026-82404
title: 'TOON is a compact, human-readable serialization of JSON data for LLM prompts'
summary: >-
  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 …
severity: high
cvss: 8.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L'
cwe:
  - CWE-1321
vendor: toon-format
product: '@toon-format/toon'
affected:
  - '@toon-format/toon < 2.3.1'
patched:
  - '@toon-format/toon 2.3.1'
published: '2026-09-02'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T21:04:42.813'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-82404'
references:
  - url: >-
      https://github.com/toon-format/toon/commit/94a2b7560b2b5ed903a4d466a3bce8b13daa2660
    label: security-advisories@github.com
  - url: 'https://github.com/toon-format/toon/pull/316'
    label: security-advisories@github.com
  - url: 'https://github.com/toon-format/toon/releases/tag/v2.3.1'
    label: security-advisories@github.com
  - url: >-
      https://github.com/toon-format/toon/security/advisories/GHSA-p95v-992w-h6c3
    label: security-advisories@github.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-82404'
  - url: 'https://github.com/advisories/GHSA-p95v-992w-h6c3'
tags:
  - nvd
  - ghsa
  - npm
epss: 0.00677
epssPercentile: 0.50232
aliases:
  - GHSA-p95v-992w-h6c3
ecosystem: npm
ingestedAt: '2026-09-03T20:08:06.590Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-82404)

Affected packages:

- `@toon-format/toon < 2.3.1`

Patched in:

- `@toon-format/toon 2.3.1`

Source: https://github.com/advisories/GHSA-p95v-992w-h6c3
