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

CVE-2026-114144: toml-node Parser DOS Vulnerability

CVE-2026-114144 is a denial of service flaw in toml-node that allows attackers to block Node.js event loop through crafted TOML documents. This post explains its impact, affected versions, and mitigation steps.

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-114144 Overview

CVE-2026-114144 affects toml-node, a TOML parser for Node.js and browser environments. Versions prior to 5.0.1 pass unbounded hexadecimal, octal, binary, and decimal digit sequences from lib/parser.js directly to BigInt() before reduceInteger() in lib/compiler.js validates the TOML 64-bit integer range. Converting a long integer string consumes super-linear CPU time and synchronously blocks the Node.js event loop. One attacker-supplied TOML document can deny service to concurrent work in the same process. The issue is a resource consumption flaw classified under [CWE-400]. Version 5.0.1 fixes the vulnerability.

Critical Impact

A single malicious TOML document can block the Node.js event loop, denying service to all concurrent requests handled by the process.

Affected Products

  • toml-node versions prior to 5.0.1
  • Node.js applications parsing untrusted TOML input via toml.parse()
  • Browser applications bundling vulnerable versions of toml-node

Discovery Timeline

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

Technical Details for CVE-2026-114144

Vulnerability Analysis

The flaw resides in the integer-literal handling path of toml-node. The parser functions peg$f42 through peg$f45 in lib/parser.js accept arbitrary-length digit sequences for hexadecimal, octal, binary, and decimal integer literals. Each function invokes BigInt() on the raw digit string before any size validation runs.

The BigInt() constructor exhibits super-linear time complexity relative to input digit count. A TOML document containing a single integer literal with hundreds of thousands of digits forces the interpreter to spend seconds or minutes converting the value. Because Node.js executes JavaScript on a single-threaded event loop, this synchronous work blocks every other pending operation in the process.

The reduceInteger() function in lib/compiler.js performs the TOML-mandated 64-bit range check, but it runs after BigInt() has already completed. The late validation cannot prevent the conversion cost that was already paid.

Root Cause

The root cause is missing input-length validation before an expensive numeric conversion. The parser trusts the grammar to produce reasonable values and defers range enforcement to the compilation stage, violating the principle of validating untrusted input at the earliest opportunity.

Attack Vector

An attacker supplies a crafted TOML document containing an oversized integer literal in any supported base. Any service that calls toml.parse() on untrusted content, such as configuration upload endpoints, package manifests, or document conversion APIs, is exposed. No authentication or user interaction is required when the parsing endpoint is reachable over the network.

javascript
// Security patch in lib/parser.js (v5.0.1)
// Source: https://github.com/BinaryMuse/toml-node/commit/9d52e384f6030932174d1afb0d910154dd62dead

// Before (vulnerable):
// function peg$f42(digits) { return node('Integer', BigInt('0x' + stripUnderscores(digits)), offset()) }
// function peg$f43(digits) { return node('Integer', BigInt('0o' + stripUnderscores(digits)), offset()) }
// function peg$f44(digits) { return node('Integer', BigInt('0b' + stripUnderscores(digits)), offset()) }
// function peg$f45(text)   { return node('Integer', BigInt(stripUnderscores(text)), offset()) }

// After (patched):
function peg$f42(digits) { return integerNode(16, digits, offset()) }
function peg$f43(digits) { return integerNode(8, digits, offset()) }
function peg$f44(digits) { return integerNode(2, digits, offset()) }
function peg$f45(text)   { return integerNode(10, text, offset()) }

The fix routes all integer-literal productions through a new integerNode() helper that rejects literals exceeding the maximum digit count for an int64 magnitude before invoking BigInt():

javascript
// Source: https://github.com/BinaryMuse/toml-node/commit/9d52e384f6030932174d1afb0d910154dd62dead
var MAX_INT64_DIGITS = { 2: 63, 8: 21, 10: 19, 16: 16 };
var RADIX_PREFIX = { 2: '0b', 8: '0o', 10: '', 16: '0x' };

function integerNode(radix, text, off) {
  var digits = stripUnderscores(text);
  var significant = digits.replace(/^[+-]?0*/, '');
  if (significant.length > MAX_INT64_DIGITS[radix]) {
    genError("Integer literal is outside the 64-bit signed integer range required by TOML.", off);
  }
  return node('Integer', BigInt(RADIX_PREFIX[radix] + digits), off);
}

Detection Methods for CVE-2026-114144

Indicators of Compromise

  • Node.js processes exhibiting sustained 100% CPU on a single core while handling TOML input.
  • Request latency spikes or health-check failures correlated with TOML upload or parsing endpoints.
  • Application logs showing unresponsive event loop or blocked event loop warnings during TOML processing.

Detection Strategies

  • Inventory dependencies with npm ls toml and flag any installation resolving below version 5.0.1.
  • Inspect application code paths that call toml.parse() on request bodies, uploaded files, or remote content.
  • Add payload-size limits and content inspection at the ingress layer to flag oversized or digit-heavy TOML documents.

Monitoring Recommendations

  • Instrument the Node.js event loop with libraries such as perf_hooks to alert on sustained lag during TOML parsing.
  • Monitor per-request CPU time on endpoints that accept TOML and alert on outliers.
  • Enable software composition analysis in CI to break builds that pull toml-node versions below 5.0.1.

How to Mitigate CVE-2026-114144

Immediate Actions Required

  • Upgrade toml-node to version 5.0.1 or later across all applications and lockfiles.
  • Audit transitive dependencies with npm ls toml and rebuild any package pinning a vulnerable range.
  • Enforce request body size limits on endpoints that accept TOML to constrain the attack surface until patching completes.

Patch Information

The fix is published as toml-node version 5.0.1. See the GitHub Release v5.0.1, the patch commit 9d52e38, and GitHub Security Advisory GHSA-9qmh-m7c6-f92p. The patch rejects integer literals whose significant digit count exceeds the int64 magnitude for the given radix before any BigInt() conversion occurs.

Workarounds

  • Reject TOML documents larger than a reasonable application-specific threshold at the request handler before invoking the parser.
  • Offload TOML parsing to a worker thread or child process so a blocked event loop does not stall the main service.
  • Pre-validate TOML input with a regex or lightweight scanner that caps integer literal length prior to full parsing.
bash
# Upgrade toml-node to the fixed release
npm install toml@^5.0.1

# Verify no vulnerable versions remain in the dependency tree
npm ls toml

# Audit the project for known advisories
npm audit --production

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.