CVE-2026-63386: js-toml: Uncontrolled recursion in `load()` causes `RangeError` (stack exhaustion) on deeply nested input
js-toml is a TOML parser for JavaScript. Prior to 1.1.3, load() does not bound nesting or dotted-key depth in the recursive parser at src/load/parser.ts or the interpreter at src/load/interpreter.ts, so deeply nested arrays, deeply nested inline tables, or long dotted keys can exhaust the V8 call stack and throw a raw RangeError instead of the documented SyntaxParseError. Applications that parse attacker-controlled TOML and handle only SyntaxParseError can rethrow the unexpected exception, which can terminate a worker or process and cause denial of service. The exception is synchronous and catchable by consumers that handle all exceptions, and the issue does not affect confidentiality or integrity. This issue is fixed in version 1.1.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
js-tomlto a version that resolves this vulnerability.Fixed in 1.1.3
Event History
Frequently Asked Questions
Which applications are exposed to denial of service?
Applications using js-toml before 1.1.3 are exposed when they parse attacker-controlled TOML. Risk is highest where callers catch only SyntaxParseError, because a stack-exhaustion RangeError can escape and terminate a worker or process.
What input is required to trigger the issue?
An unauthenticated attacker needs to supply TOML with deeply nested arrays, deeply nested inline tables, or long dotted keys. The vulnerable load() parsing path does not bound these nesting depths.
What can be done before upgrading?
Handle all exceptions raised by TOML parsing rather than only SyntaxParseError, so the synchronous RangeError can be caught instead of terminating the worker or process. Upgrade to js-toml 1.1.3 to apply the fix.
Does successful exploitation expose or alter data?
No. The reported impact is availability only: stack exhaustion can cause denial of service, with no confidentiality or integrity impact described.