CVE-2026-85730 — smol-toml
Fix: squirrelchat/smol-toml@30f5c36CVE-2026-85730 is a CWE-606 vulnerability in smol-toml. A fix is available for smol-toml — see the affected versions and patch details below.
smol-toml: Denial of Service via malformed TOML documents
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-85730.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
smol-tomlnpmDescription
Summary
parse() can be forced into an infinite loop when a value inside an array or inline table is followed by a comment that has no trailing newline (i.e. the comment "ends" the document).
The library fails to exit an internal loop when attempting to find the end of the structure, resetting its cursor to the beginning of the string instead. This causes the parser to indefinitely hang, compromising the availability of the service.
Proof of concept
import { parse } from 'smol-toml'
parse('a=[1 #') // never returns; CPU pinned at 100%
Impact
Applications which parse arbitrary TOML documents can suffer major availability issues if they receive malicious input. This issue is particularly severe for these use-cases, and it is strongly advised to upgrade to an up-to-date version of the library as soon as possible.
If your use-case does not involve parsing arbitrary TOML documents from untrusted sources, the impact is much lower in practice, although it's still advisable to update to version 1.7.1.
Patches
Version 1.7.1 properly breaks out of the loop in these situations and throws the expected TomlError.
Workarounds
None that don't involve refactors. Update the library as soon as possible if your use-case involves parsing arbitrary TOML documents from untrusted sources.
Reported By : Ravindu Lakmina Munaweera
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | smol-toml | all versions | 1.7.1npm install smol-toml@1.7.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for smol-toml, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update smol-toml to 1.7.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-85730 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift AI 3.4 | rhoai/odh-feature-server-rhel9:1791863220 | RHSA-2026:84734 |
Frequently Asked Questions
Is CVE-2026-85730 in your dependencies?
Find it across npm, including transitive dependencies.