CVE-2026-85730
largeInfinite-loop denial of service in smol-toml TOML parser (npm)
smol-toml, a TOML parser and serializer distributed via npm, contained a denial-of-service flaw (fixed in 1.7.1) in which parse() enters an infinite loop when a value inside an array or inline table is followed by a comment that has no trailing newline. In that case skipUntil() calls indexOfNewline(), which returns -1 at the end of input, and the helper resets the scan cursor to the beginning of the string, so the parser hangs indefinitely. An attacker who can supply TOML input to an application running an affected version gains a remote denial of service, hanging the process and consuming the service's processing capacity; the CVSS 4.0 score of 8.2 reflects high availability impact with no confidentiality or integrity impact. Any npm application or service that parses attacker-controlled TOML with smol-toml prior to 1.7.1 is affected. Exploitation has not been observed: there is no known public proof-of-concept, the flaw is not in CISA's KEV, and EPSS estimates a 0.4% probability of exploitation within 30 days.
What to do: Upgrade smol-toml to 1.7.1 or later, including updating lockfiles where it appears as a transitive dependency (search npm/yarn/pnpm lockfiles for smol-toml). Until patched, avoid parsing untrusted TOML with affected versions, or pre-screen/reject input containing comments without a trailing newline inside arrays or inline tables, and consider enforcing a parse timeout. Note the trigger condition when reviewing any service that accepts TOML configuration or user-supplied TOML input.
| smol-toml (npm project) smol-toml | <1.7.1 (fixed in 1.7.1) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
smol-toml is a small, fast, and correct TOML parser and serializer. Prior to 1.7.1, parse() can enter an infinite loop when a value inside an array or inline table is followed by a comment with no trailing newline. In src/util.ts, skipUntil() calls indexOfNewline(), receives -1 at the end of input, and resets the cursor to the beginning of the string instead of leaving the structure scan. The parser then hangs indefinitely and can consume a service's processing capacity when an application parses attacker-controlled TOML. This issue is fixed in version 1.7.1.
- Ecosystems
- npm
- Weakness
- CWE-606, CWE-835
- Vector
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- GHSA
- GHSA-7w5x-hrqm-74c2 (high)
In the news0 stories
No ingested article mentions this CVE yet.