Skip to main content

smol-toml CVE-2026-85730

| EUVDEUVD-2026-71261 HIGH
Unchecked Input for Loop Condition (CWE-606)
2026-09-04 GitHub_M GHSA-7w5x-hrqm-74c2
8.2
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify TOML-accepting service endpoint
  2. Delivery
    Craft array or inline-table value with trailing comment and no newline
  3. Exploit
    Submit malformed TOML to endpoint
  4. Install
    skipUntil() receives -1 from indexOfNewline()
  5. C2
    Cursor resets to string start
  6. Execute
    Parser spins indefinitely
  7. Impact
    Service 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

smol-toml < 1.7.1

Affected Packages

npm smol-toml fix: 1.7.1

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

Vendor (GitHub_M) PRIMARY 8.2 HIGH
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
vuln.today AI 7.5 HIGH

Network-reachable with no privileges or interaction needed; sole impact is availability via infinite loop; scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 7.5 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 04, 2026 - 17:17 EUVD
CVE Published
Sep 04, 2026 - 15:21 cve.org
HIGH 8.2

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Low
niche npm TOML parser, limited enterprise production footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy