CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-77465

CVE-2026-77465: Uncontrolled Recursion in toml-node Deserializer Leads to Denial of Service

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 3, 2026·6 min read·5 visits

Executive Summary (TL;DR)

A stack exhaustion vulnerability in toml-node allows remote attackers to crash Node.js application servers by submitting deeply nested arrays or inline tables, triggering a process-terminating RangeError.

An uncontrolled recursion vulnerability (CWE-674) in the toml-node NPM package (published as toml) prior to version 4.2.0 allows unauthenticated remote attackers to trigger process-wide Denial of Service (DoS) crashes. By submitting TOML payloads with deep bracket or brace nesting, attackers exhaust the V8 runtime stack limit.

Vulnerability Overview

The toml-node library (published as toml on the NPM registry) is an engine used to parse TOML (Tom's Obvious Minimal Language) configuration files and payloads in Node.js applications. In microservices and web applications, configurations or incoming API requests may be represented in TOML formats. This library acts as the primary deserialization mechanism for such datasets.

Prior to version 4.2.0, the core parser implemented in toml-node is susceptible to uncontrolled recursion when processing deeply nested arrays or inline tables. An attacker who is able to submit crafted inputs to an application using this library can consume all available stack frames, triggering an unhandled exception. This exhaustion happens because the parsing logic performs a sequence of function calls that maps directly to input nesting depth.

Because Node.js operates on a single-threaded event loop by default, an uncaught runtime error of this nature does not merely fail the individual transaction. Instead, it crashes the entire node process. This behavior elevates the impact of a simple parsing exception to an application-wide Denial of Service (DoS) state.

Root Cause Analysis

The root cause of CVE-2026-77465 lies in the mutual recursion defined in the parser's PEGjs grammar file (src/toml.pegjs). toml-node utilizes Peggy (specifically version 5.1.0) to generate its parser code. Peggy compiles Parsing Expression Grammars into recursive-descent parsers, where each grammar rule compiles into a JavaScript function.

In the vulnerable grammar structure, the rules governing values, arrays, and inline tables reference each other recursively. Specifically, the value rule can match an array or an inline_table. An array contains nested elements that must be evaluated against the value rule, and an inline_table contains key-value pairs where each value is again parsed using the value rule.

When processing nesting, the generated parser executes a series of nested function calls. This process repeats for every level of nesting in the input string. This pattern forms a direct recursion path: peg$parsevalue to peg$parsearray to peg$parsevalue.

The V8 engine utilized by Node.js maintains a platform-dependent call stack size limit, typically ranging from 10,000 to 104,000 frames. Because there are no limits on the depth of the recursive calls inside the toml-node grammar, a highly nested payload easily exhausts this allocation. This results in a synchronous, uncatchable RangeError exception.

Code Analysis: Vulnerable vs. Patched

In vulnerable versions of toml-node, the src/toml.pegjs grammar file does not track depth. The rules evaluate child elements recursively without checking how deep the execution flow has descended. The patch introduced in commit 967b8b06754f3ecd9863cea118dc50792a8c353f mitigates this vulnerability by tracking state and establishing a maximum depth limit.

Below is a simplified differential analysis of the grammar modifications implemented to fix this vulnerability:

// --- PATCH ADDITIONS IN INITIALIZATION BLOCK ---
// A maximum depth option is introduced, defaulting to 500
var depth = 0;
var MAX_DEPTH = (options && options.maxDepth != null) ? options.maxDepth : 500;
// --- GRAMMAR RULE PATCH ---
// Vulnerable Grammar:
// value = string / number_or_date / boolean / array / inline_table
 
// Patched Grammar:
// The value rule now uses a semantic predicate to check depth
value
  = &{ if (++depth > MAX_DEPTH) { depth--; genError("Maximum nesting depth of " + MAX_DEPTH + " exceeded.", offset()); } return true; }
    v:value_choice { return v; }
 
value_choice
  = v:value_body { depth--; return v; }
  / &{ depth--; return false; }
 
value_body
  = string / number_or_date / boolean / array / inline_table

The implementation uses a semantic predicate &{ ... } to increment depth. If the limit is reached, it decrements the counter to maintain alignment and generates a parse error. The value_choice rule ensures that whether parsing succeeds (via value_body) or fails (triggering backtracking), the depth counter is correctly decremented.

Attack Methodology & Exploitation

Exploitation of CVE-2026-77465 requires no privileges and can be executed via any interface that accepts TOML payloads and feeds them directly into toml.parse(). Since many microservices accept user-defined config data, settings, or request payloads in TOML format, the attack vector remains highly accessible.

To trigger the crash, an attacker prepares a payload containing thousands of nested brackets or braces. The payload is designed to force the recursive descent parser into thousands of self-referencing loops, quickly exceeding the call stack limit of the target host.

An attacker can construct a payload consisting of a variable containing 10,000 nested arrays: a = [[[[[[...[1]...]

Alternatively, the attacker can use a payload consisting of nested inline tables: a = {b={b={b={...{b=1}...}}}}

The execution of toml.parse() on this payload will immediately trigger the uncaught RangeError, resulting in the failure of the application thread. Because Node.js single-threaded applications usually lack automatic recovery wrappers around parse libraries, the entire process terminates, disrupting services for all active users.

Impact Assessment & Contextual Risk

The technical impact of CVE-2026-77465 is classified as a High-severity Denial of Service (DoS) vulnerability, holding a CVSS score of 7.5. Because the vulnerability is exploited over the network (AV:N) with low complexity (AC:L) and requires no special privileges (PR:N) or victim interaction (UI:N), it poses a significant threat to internet-exposed Node.js systems processing untrusted TOML data.

Although this vulnerability does not allow for Remote Code Execution (RCE) or information disclosure (C:N/I:N), the ease with which an attacker can disrupt services makes it an attractive target. A single HTTP request with a small payload (less than 50 KB) containing the nested structures is sufficient to take down a backend worker.

In cloud environments where auto-scaling or container orchestrators (such as Kubernetes) are configured, a continuous stream of such payloads can cause a crash-loop backoff state. This exhausts container resources, incurs high cloud-billing costs, and prevents legitimate users from accessing the system.

Patch Validation & Backtracking Security

The fix implemented in toml-node version 4.2.0 is highly robust because of how it handles the parsing state during backtracking. In PEG engines, the parser frequently backtracks when a matched path fails to satisfy a rule, reverting to try a different configuration.

If a naive depth counter had been used (e.g., simply incrementing at the start of a rule and decrementing at the end of a successful match), a backtracking action would have skipped the decrement. This would lead to a "depth leak", where the counter remains elevated despite the parser descending back to a shallow depth, eventually resulting in false-positive blocks on valid, shallow TOML elements.

By structuring the logic with value_choice and implementing a backtrack-reverting alternative predicate (/ &{ depth--; return false; }), the developer ensured that the state tracking is transactionally aligned. Security researchers have evaluated this patch and confirmed that the depth tracking handles backtracking safely, making the fix highly resilient.

Official Patches

BinaryMuseCommit fixing the uncontrolled recursion by adding depth tracking

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

toml-node (NPM package 'toml')

Affected Versions Detail

Product
Affected Versions
Fixed Version
toml-node
BinaryMuse
< 4.2.04.2.0
AttributeDetail
CWE IDCWE-674
Attack VectorNetwork
CVSS Score7.5 (High)
EPSS ScoreNot currently assigned
ImpactDenial of Service (DoS)
Exploit StatusProof-of-concept
KEV StatusNot listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-674
Uncontrolled Recursion

The product code contains a recursive function but lacks a structural check to ensure the call stack does not overflow.

Known Exploits & Detection

GitHub Security AdvisoryVulnerability disclosure and stack overflow details

References & Sources

  • [1]https://www.cve.org/CVERecord?id=CVE-2026-77465
  • [2]https://github.com/BinaryMuse/toml-node/security/advisories/GHSA-82x6-q7mm-w9cf
  • [3]https://github.com/BinaryMuse/toml-node/pull/72

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•12 minutes ago•GHSA-7J72-F6WG-CXW6
8.6

CVE-2026-68584: Authentication Bypass via Auxiliary Content Endpoints in SiYuan

An authentication bypass vulnerability (classified as CWE-288) exists in the publish-mode component of SiYuan, a Go-based note-taking application. This security flaw allows unauthenticated remote attackers to bypass password-protected note boundaries by leveraging auxiliary block endpoints that fail to enforce document access checks. Attackers can exploit this issue by first harvesting document metadata via a public search endpoint and subsequently fetching full rendered document contents using vulnerable block endpoints. This technical analysis explores the root cause, exploitation methodology, and remediation path.

Alon Barad
Alon Barad
0 views•7 min read
•about 2 hours ago•CVE-2026-73295
5.4

CVE-2026-73295: DOM-based Cross-Site Scripting (XSS) in Material for MkDocs Search Suggestions

CVE-2026-73295 is a DOM-based Cross-Site Scripting (XSS) vulnerability affecting Material for MkDocs versions 7.2.0 through 9.7.6. When the optional 'search.suggest' feature is enabled, the client-side 'mountSearchSuggest' function processes user-controlled inputs from the URL 'q' parameter and writes them directly to the DOM using an unsafe innerHTML sink without sanitization.

Alon Barad
Alon Barad
3 views•6 min read
•about 3 hours ago•CVE-2026-71869
9.3

CVE-2026-71869: Remote Code Execution in Orval via OpenAPI Default Value Template Literal Injection

CVE-2026-71869 is a critical-severity code injection vulnerability in the Orval code generator (packages: orval, @orval/core, @orval/zod) prior to version 8.21.0. This flaw allows remote attackers to execute arbitrary JavaScript code at import-time by embedding malicious payloads into the default values of OpenAPI or Swagger specifications. This report details the root cause, exploitation mechanism, and patch remediation.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 4 hours ago•CVE-2026-61625
6.8

CVE-2026-61625: Arbitrary File Write via Path Traversal in VictoriaMetrics vmrestore

CVE-2026-61625 is a path traversal vulnerability (CWE-22) within the `vmrestore` utility of VictoriaMetrics. When restoring database shards from a compromised or malicious backup source, the application fails to validate the paths of backup parts before creating and writing files. By injecting objects with directory traversal sequences (such as `../`) into the remote backup storage, an attacker can write arbitrary files to out-of-bounds locations on the system executing the restore operation. Depending on the process privileges, this can result in host compromise via remote code execution.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 5 hours ago•CVE-2026-73846
6.5

CVE-2026-73846: Cache Key Canonicalization Collision in ondata ckan-mcp-server

A medium-severity cache key canonicalization collision vulnerability exists in the ckan-mcp-server prior to version 0.4.112. Unescaped delimiters in key-value parameters and server URLs allow structurally distinct requests to map to the same cryptographic hash, facilitating cache poisoning and unauthorized data exposure.

Alon Barad
Alon Barad
4 views•7 min read
•about 6 hours ago•GHSA-99RQ-75J6-5J9F
8.7

GHSA-99rq-75j6-5j9f: Stored and Reflected XSS in SiYuan via SVG Sanitizer Bypass

A stored and reflected Cross-Site Scripting (XSS) vulnerability was identified in the SiYuan kernel before version v3.7.3. The flaw occurs due to a parser differential between the backend Go-based HTML sanitizer and the browser-side XML rendering engine. Attackers can bypass the SVG sanitizer to execute arbitrary JavaScript within the context of the application's origin, leading to complete workspace compromise, data exfiltration, and full local kernel API manipulation.

Amit Schendel
Amit Schendel
3 views•5 min read