CVE-2026-85730: smol-toml infinite loop in parser via malformed TOML

CVE-2026-85730 · Severity: high · CVSS 4 · Published 2026-09-04

smol-toml is a JavaScript library used to parse TOML configuration files, a common data format used in many applications. When given a malformed TOML document (as small as 7 bytes: `a=[1 #`), the parser enters an infinite loop that freezes the application and consumes all available CPU resources. Any service that parses untrusted TOML input is vulnerable to complete denial of service, making the application unresponsive to legitimate users.

Technologies: smol-toml (npm). Vendors: npm.

Quick answers

Is CVE-2026-85730 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-85730 being exploited in the wild.
How severe is CVE-2026-85730?
High severity, with a CVSS score of 4, published 4 September 2026.
Which products and versions are affected?
smol-toml (npm) <= 1.7.0, SEMVER:introduced=0,fixed=1.7.1.
Is there a fix for CVE-2026-85730?
Yes. smol-toml (npm): upgrade to 1.7.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-85730 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-85730?
Check whether you run smol-toml (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • smol-toml (npm): upgrade to 1.7.1 or later
    npm install smol-toml@1.7.1

Technical details

The vulnerability is an infinite loop (CWE-835) in the TOML parser's internal loop condition handling. When a value inside an array or inline table is followed by a comment that ends the document without a trailing newline, the parser fails to properly detect the end-of-structure condition. Instead of throwing a TomlError, it resets its cursor to the beginning of the input string and re-enters the loop, repeating indefinitely. The attack vector is network/local—any code path that calls parse() with untrusted input is exploitable. No authentication or privileges are required. The fix is provided in version 1.7.1, which properly breaks out of the loop and throws the expected error.

Affected products

  • squirrelchat smol-toml <= 1.7.0

Identifiers

  • CVE-2026-85730
  • GHSA-7w5x-hrqm-74c2

Timeline

  • 2026-08-09: disclosed
  • 2026-08-09: patched: Version 1.7.1 released with fix
  • 2026-09-09: advisory: GitHub Security Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.