js-toml maintainers disclose denial-of-service flaw in versions below 1.1.3

  • js-toml
  • TOML parser
  • denial of service
  • recursion

Deeply nested TOML input can trigger an uncaught RangeError

The issue is fixed in version 1.1.3

The js-toml maintainers disclosed an uncontrolled recursion vulnerability in the library’s load() function on November 20, 2026. Deeply nested TOML input can exhaust the JavaScript call stack and cause a denial of service.

The library uses a recursive-descent parser and a recursive tree-walking interpreter, but does not enforce a maximum nesting or key depth. Deeply nested arrays or inline tables, as well as long dotted keys, can exceed the V8 call-stack limit. The resulting uncaught RangeError replaces the SyntaxParseError the function is expected to return. The advisory says input of about 2 KB can reliably trigger the error.

The vulnerability affects js-toml versions earlier than 1.1.3. The maintainers fixed it in version 1.1.3.