All vulnerabilities

npm

CVE-2026-63386

js-toml allows uncontrolled recursion in `load()` leading `RangeError` (stack exhaustion) on deeply nested input

Severity
Medium 5.3
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.1.3
Exploit chance
0.4% in the next 30 daysHigher than 30% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Uncontrolled recursion (CWE-674)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-3g82-77xr-68x5
Sources
OSV.dev and GitHub

Description

load() parses untrusted TOML using a recursive-descent parser (Chevrotain) and a recursive tree-walking interpreter. Neither the parser nor the interpreter enforces a maximum nesting / key depth. A small, attacker-controlled document with deep nesting (arrays, inline tables) or a long dotted key drives recursion past the V8 call-stack limit, and load() throws an uncaught RangeError: Maximum call stack size exceeded.

This is a problem for two reasons:

  • Denial of Service. A tiny payload (≈2 KB) reliably aborts parsing. In any service that parses user-supplied TOML, an unhandled RangeError can crash the worker/process (500 / restart loop).
  • Error-contract violation. The library signals invalid input via SyntaxParseError (see src/load/exception.ts; the entire test suite asserts SyntaxParseError). Consumers that follow this contract —

— will re-throw the RangeError instead of treating the input as malformed, turning malformed input into an unexpected fatal error.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
js-tomlnpm · osv:npm:js-toml
  • Every version before 1.1.3

About js-toml

Weekly downloads (npm)
124,020npm, 23 Nov 2026

This is the only vulnerability in js-toml in our list.

References