Skip to main content
Vulnerability Database/CVE-2026-114141

CVE-2026-114141: toml-node TOML Parser DOS Vulnerability

CVE-2026-114141 is a denial of service vulnerability in toml-node TOML parser that blocks the Node.js event loop through quadratic work during array-of-tables parsing. This post covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-114141 Overview

CVE-2026-114141 affects toml-node, a TOML parser for Node.js and the browser. The flaw resides in the addTableArray() function inside lib/compiler.js, which rescans the assignedPaths and valueAssignments bookkeeping sets for every array-of-tables header. Because distinct [[name]] paths are not pruned, parsing a document with many such headers produces quadratic synchronous work. The result blocks the Node.js event loop and denies service to other operations running in the same process. The maintainers fixed the issue in version 5.0.1.

Critical Impact

A single crafted TOML document can stall the Node.js event loop, degrading or halting all concurrent request handling in the affected process.

Affected Products

  • toml-node versions prior to 5.0.1
  • Node.js applications that parse untrusted TOML input with toml.parse()
  • Browser applications bundling vulnerable toml-node releases

Discovery Timeline

  • 2026-10-21 - CVE-2026-114141 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-114141

Vulnerability Analysis

The vulnerability is an algorithmic complexity flaw classified under [CWE-407] (Inefficient Algorithmic Complexity). The compiler phase of toml.parse() tracks assigned paths and value assignments in two internal sets. For every array-of-tables header, addTableArray() iterates over the full contents of these sets to validate the new entry.

The cost of each insertion grows linearly with the number of previously seen headers. Across n distinct [[name]] headers, the total work scales as O(n²). Parsing is synchronous, so this work runs on the Node.js main thread and blocks the event loop until completion.

An attacker who can submit TOML content to a vulnerable service can trigger measurable processing delays with a compact payload. Larger payloads translate directly into longer stalls and effective denial of service for concurrent clients sharing the process.

Root Cause

The addTableArray() function in lib/compiler.js does not prune or deduplicate distinct [[name]] paths before iterating. Each new header forces a full rescan of the growing bookkeeping sets, producing quadratic time complexity instead of linear.

Attack Vector

Exploitation requires only that an attacker supply TOML input to a parser call. No authentication, user interaction, or elevated privilege is needed. Any network-facing endpoint, build pipeline, configuration loader, or client-side component that calls toml.parse() on attacker-influenced input is reachable.

A verified public exploit is not listed for this issue. Technical details and the fix are documented in the GitHub Security Advisory GHSA-4qx8-w7c3-pj3p and the upstream commit.

Detection Methods for CVE-2026-114141

Indicators of Compromise

  • Sustained single-core CPU saturation on Node.js processes that handle TOML input.
  • Event loop lag spikes correlated with inbound requests carrying TOML payloads.
  • Request timeouts or dropped connections on services that otherwise show normal network throughput.
  • TOML payloads containing an unusually high count of distinct [[name]] array-of-tables headers.

Detection Strategies

  • Inventory dependencies with npm ls toml or equivalent lockfile scans to identify versions below 5.0.1.
  • Add Software Composition Analysis (SCA) rules that flag the GHSA-4qx8-w7c3-pj3p advisory in build pipelines.
  • Instrument parsing paths with timing metrics and alert when toml.parse() duration exceeds a defined threshold.

Monitoring Recommendations

  • Track Node.js event loop lag using perf_hooks or an APM agent and alert on sustained delays above normal baselines.
  • Log request body sizes and parse durations for endpoints that accept TOML content.
  • Correlate anomalous CPU usage with upstream clients to identify repeat abusers.

How to Mitigate CVE-2026-114141

Immediate Actions Required

  • Upgrade toml-node to version 5.0.1 or later across all applications and build artifacts.
  • Audit services that accept user-supplied TOML and apply strict request size limits.
  • Move TOML parsing of untrusted input off the main thread using worker threads where feasible.

Patch Information

The fix is available in toml-node version 5.0.1. See the GitHub Release v5.0.1 notes and the upstream commit 609c873 for the code changes that eliminate the quadratic rescan.

Workarounds

  • Reject TOML inputs that exceed a conservative byte limit before invoking toml.parse().
  • Cap the number of allowed [[name]] headers through a lightweight pre-scan.
  • Impose a parse timeout by executing toml.parse() inside a worker thread and terminating runs that exceed a budget.
  • Restrict TOML parsing endpoints behind authentication and rate limiting until patching is complete.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.