Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify TOML-accepting service endpoint
-
DeliveryCraft array or inline-table value with trailing comment and no newline
-
ExploitSubmit malformed TOML to endpoint
-
InstallskipUntil() receives -1 from indexOfNewline()
-
C2Cursor resets to string start
-
ExecuteParser spins indefinitely
-
ImpactService thread consumed, all requests blocked
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Unchecked input for loop condition
|
| Exploitation Conditions | The application must accept and parse TOML input supplied or influenced by the attacker - for example, a configuration upload endpoint, a CI pipeline that reads TOML files from a repository, or any API that deserializes user-provided TOML. The malicious input must contain a value inside a TOML array or inline table followed by a comment character (#) with no trailing newline (i.e., the comment runs to end-of-file with no newline terminator). The CVSS 4.0 AT:P metric encodes this deployment prerequisite explicitly. Services that only parse internally generated or pre-validated TOML, or that enforce a newline at end of all TOML input, are not at risk. No authentication bypass or privilege escalation is involved - if the parsing endpoint requires authentication, the attacker must first authenticate before sending the crafted payload. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VA:H) scores 8.2, reflecting a network-reachable, low-complexity, unauthenticated trigger with full availability impact on the vulnerable process. The AT:P (attack target prerequisite) modifier is the key limiting factor: exploitation requires that the application accept and parse attacker-supplied TOML - a pattern common in configuration upload APIs, CI/CD pipelines that read repository TOML files, and any settings endpoint that deserializes user input. Where that condition is met, the attack is trivially simple: a single crafted string causes a Node.js event loop to spin at 100% CPU, blocking all subsequent request processing on that thread. No public exploit code has been identified at time of analysis, and the vulnerability is absent from CISA KEV, but the low construction complexity means any developer who reads the advisory can reproduce the trigger immediately. The CVSS 3.1 equivalent (7.5, AV:N/AC:L/PR:N/UI:N/S:U/A:H) is consistent and confirms the high-severity classification is accurate for deployments that expose TOML parsing to untrusted input. |
| Exploit ScenarioDerived | An attacker submits a POST request to a publicly accessible configuration API that passes user-supplied TOML directly to smol-toml's parse() function, including the payload arr = [1 comment with no trailing newline at end of file. The parser enters skipUntil(), indexOfNewline() returns -1, the cursor resets to the string start, and the parser loops forever - consuming 100% of the Node.js thread and rendering the service unresponsive to all subsequent requests. In a single-process deployment, the service must be restarted to recover. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 04, 2026
Infinite-loop denial-of-service in smol-toml (npm, squirrelchat) before version 1.7.1 allows remote unauthenticated attackers to permanently hang any Node.js service that parses attacker-controlled TOML. The trigger is a crafted value inside a TOML array or inline table followed by a comment character with no trailing newline - when this input reaches the parser, skipUntil() in src/util.ts receives -1 from indexOfNewline() and resets the cursor to position zero instead of terminating, spinning indefinitely and consuming all processing capacity. No public exploit has been identified at time of analysis, but the CVSS 4.0 score of 8.2 and the trivially constructible trigger make this straightforward to weaponize against any exposed TOML-parsing endpoint.
RemediationAI
Upgrade smol-toml to version 1.7.1 or later (vendor-released patch: v1.7.1), available on npm and documented at https://github.com/squirrelchat/smol-toml/releases/tag/v1.7.1. The underlying fix is commit 30f5c367, which adds a one-line break guard in skipUntil() when indexOfNewline() returns -1. If an immediate upgrade is not feasible, the primary compensating control is to gate TOML parsing behind authentication or to validate that all TOML input is newline-terminated before passing it to the parser, rejecting any input that does not end with a newline character. A second compensating control is to run the parser in a Node.js Worker thread with an enforced timeout (e.g., via worker_threads and AbortController), so that a hung parse is killed rather than blocking the main event loop - note this adds latency overhead and requires application-level error handling for parse failures. Neither workaround eliminates the root cause; upgrading to v1.7.1 is the definitive fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
smol-toml is a TypeScript/JavaScript TOML 1.0 parser and serializer published on npm by squirrelchat (CPE: cpe:2.3:a:squirrelchat:smol-toml:*:*:*:*:*:*:*:*). The flaw is classified as CWE-606 (Unchecked Input for Loop Condition). Internally, the parser uses skipUntil() in src/util.ts to scan past comments and whitespace; skipUntil() calls indexOfNewline() to locate the next line boundary. When the input ends without a newline - a legal but edge-case condition - indexOfNewline() returns -1. The unchecked -1 is used as a cursor offset, effectively resetting the scan position to the beginning of the input string. The parser then repeats the same scan indefinitely, making no forward progress. The fix committed in 30f5c367 adds a single guard - if (i < 0) break - that properly terminates the loop on end-of-input, and was shipped as release v1.7.1.
Know when Smol Toml gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable with no privileges or interaction needed; sole impact is availability via infinite loop; scope unchanged.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 112 npm packages depend on smol-toml (69 direct, 46 indirect)
Ecosystem-wide dependent count for version 1.7.1.
Technical POC Analysis
The flaw is an unchecked loop-boundary condition in the TOML parser's structure scanner, matching CWE-606 (Unchecked Input for Loop Condition) and resulting in CWE-835 (Infinite Loop).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
smol-toml, a widely-used Node.js TOML parser in squirrelchat and similar applications, contains an infinite-loop vulnerability that allows unauthenticated remote attackers to completely disable affected services by sending crafted TOML payloads. Organizations running services that parse user-supplied TOML face immediate risk of service unavailability without requiring any user authentication.
Until vendor patch is released: implement strict input validation and whitelist allowed TOML structures, rejecting any payloads matching the known trigger pattern; deploy request rate-limiting on TOML-parsing endpoints to reduce rapid-fire DoS impact; configure Web Application Firewall to block malformed TOML submissions; segment network access to TOML-parsing services where feasible to limit blast radius; maintain continuous monitoring of vendor advisories and npm release channels for patch availability and prepare testing environments for rapid upgrade upon release.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-71261
GHSA-7w5x-hrqm-74c2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB