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-114142 Overview
CVE-2026-114142 is a prototype pollution vulnerability [CWE-1321] in toml-node, a TOML parser for Node.js and the browser. Versions prior to 5.0.1 allow toml.parse() to write attacker-controlled properties to Object.prototype. The flaw originates in quoteDottedString() within lib/compiler.js, which produces identical bookkeeping strings for distinct quoted key paths. This collision allows addTableArray() to clear another key's guard, enabling the assign() path to descend through an unowned Date value and reach the prototype chain. Objects created elsewhere in the Node.js process can then inherit the injected property.
Critical Impact
Attackers who control TOML input can pollute Object.prototype and inject properties inherited by unrelated objects, enabling integrity attacks and downstream remote code execution in affected Node.js applications.
Affected Products
- toml-node versions prior to 5.0.1
- Node.js applications parsing untrusted TOML input via toml.parse()
- Browser-based applications bundling vulnerable toml-node releases
Discovery Timeline
- 2026-10-21 - CVE-2026-114142 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-114142
Vulnerability Analysis
The vulnerability is a prototype pollution issue in the compiler stage of toml-node. When parsing TOML documents, the library maintains bookkeeping strings that track which key paths have been assigned and which containers are owned by the parser. The quoteDottedString() function in lib/compiler.js fails to differentiate distinct quoted key paths, producing identical bookkeeping strings for inputs that should be treated as separate. This string collision undermines the parser's internal guards against reassigning existing properties.
When addTableArray() processes an attacker-crafted key path, it inadvertently clears the guard associated with a different legitimate key. The subsequent assign() traversal then walks through containers it does not own, including a Date value, without re-applying the owned-container check that normally prevents writes outside the parsed document tree.
Because assign() reaches the prototype chain, properties written by the attacker land on Object.prototype. Any object created elsewhere in the Node.js runtime inherits these injected properties, which can corrupt application state, bypass authorization checks, or set properties consumed by sinks that lead to code execution.
Root Cause
The root cause is non-unique key-path serialization in quoteDottedString() combined with a missing owned-container check in assign(). Together these two defects allow guard state for one key to be cleared by another and allow writes to proceed into unowned objects on the prototype chain.
Attack Vector
Exploitation requires an application to pass attacker-controlled TOML content to toml.parse(). The attacker crafts a document that uses quoted dotted keys and table arrays to trigger the bookkeeping-string collision. No authentication or user interaction is required when the parsing surface is network-reachable, such as a configuration-upload endpoint or a TOML-based API body.
// Code example not available - refer to the vendor advisory and patch commit
// for the exact crafted TOML payload and compiler-level fix details.
// See: GitHub Security Advisory GHSA-h895-cgqg-jf52
Detection Methods for CVE-2026-114142
Indicators of Compromise
- Unexpected properties appearing on Object.prototype observable via Object.prototype.hasOwnProperty.call(Object.prototype, key) returning true for keys the application never sets.
- TOML inputs that contain quoted dotted keys combined with [[table.array]] constructs targeting __proto__, constructor, or prototype segments.
- Runtime errors or anomalous behavior in modules that read configuration keys shortly after a TOML parse operation.
Detection Strategies
- Perform software composition analysis (SCA) across build artifacts and package-lock.json files to identify toml-node versions below 5.0.1.
- Add runtime guards that snapshot Object.getOwnPropertyNames(Object.prototype) before and after each toml.parse() call and alert on deltas.
- Inspect HTTP and message-queue payloads for TOML content containing __proto__, constructor.prototype, or heavily nested quoted dotted keys.
Monitoring Recommendations
- Log all invocations of toml.parse() with input size, source identifier, and parse duration to establish a baseline for anomaly detection.
- Instrument Node.js processes to capture stack traces whenever writes occur to Object.prototype, Array.prototype, or Function.prototype.
- Correlate TOML parse events with downstream authorization decisions and child-process spawns to surface prototype-pollution-to-RCE chains.
How to Mitigate CVE-2026-114142
Immediate Actions Required
- Upgrade toml-node to version 5.0.1 or later in all production, staging, and build environments.
- Audit all code paths that pass untrusted input into toml.parse() and gate them behind size and schema validation.
- Rebuild and redeploy container images, serverless bundles, and browser bundles that pin a vulnerable version.
Patch Information
The fix is published in toml-node5.0.1. The patch corrects the bookkeeping-string generation in quoteDottedString() and restores the owned-container check in the assign() path, blocking writes that would otherwise descend into the prototype chain. See the GitHub v5.0.1 Release, the GitHub Commit Changes, and the GitHub Security Advisory GHSA-h895-cgqg-jf52.
Workarounds
- Freeze prototypes early in process startup using Object.freeze(Object.prototype) to block writes if upgrading is not immediately possible.
- Reject TOML inputs containing __proto__, constructor, or prototype key segments at the application boundary before invoking the parser.
- Isolate TOML parsing in a worker thread or sandboxed child process so that pollution does not reach the main application context.
# Upgrade toml-node to the patched release
npm install toml@5.0.1
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

