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-63376

CVE-2026-63376: Prototype Pollution via Path Desynchronization in toml-node

Alon Barad
Alon Barad
Software Engineer

Sep 4, 2026·6 min read·50 visits

Executive Summary (TL;DR)

Improper key verification and unrestricted recursive object traversal in toml-node's compiler logic allow remote attackers to poison Object.prototype via crafted TOML input, enabling prototype pollution.

A prototype pollution vulnerability exists in the toml-node library (by BinaryMuse) in versions prior to 4.1.2. The flaw arises from inconsistent internal tracking of parsed paths (comma-joined vs. dot-joined serialization) combined with lack of object ownership validation during recursive dictionary descent (scalar descent). This allows unauthenticated remote attackers to modify base object structures by crafting malicious TOML documents containing conflicting duplicate table paths or nested references.

Vulnerability Overview

The toml-node library is a standard package used to parse TOML configuration data in Node.js environments. The core vulnerability is categorized under CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, or 'Prototype Pollution'). By feeding a specifically structured input to toml.parse(), an attacker can bypass duplicate-key detection mechanisms and force the engine to write properties onto the global Object.prototype dictionary.

In standard applications, configuration files are often treated as trusted inputs. However, in scenarios where users can supply configurations dynamically, such as API configurations, dashboard layouts, or serverless configuration payloads, this parser vulnerability opens up a significant unauthenticated remote execution attack vector.

Because most JavaScript objects inherit directly from Object.prototype, any successful injection of key-value pairs becomes immediately visible to all objects across the active Node.js application process. This global state mutation can lead to downstream property injection attacks, process crashes, or arbitrary command execution depending on the existence of vulnerable gadget paths within other loaded dependencies.

Root Cause Analysis

The compiler within lib/compiler.js tracks traversed table pathways to ensure they are not declared more than once, as dictated by the TOML specification. Two main data structures are tasked with this state tracking: assignedPaths and valueAssignments. When evaluating and enforcing duplicate boundaries, the library relies on exact string matching of serialized path segments.

However, a path serialization desynchronization occurs because the engine records values inside the track sets using inconsistent formats. Value assignments generate implicit or comma-separated representations such as a,b.y, while the internal lookup function deepRef() formats keys using a standard dot-separated representation like a.b.y. Because of this structural mismatch, validation queries against the tracking sets fail to find existing records, silently bypassing duplicate-key detection checks.

Furthermore, when a table definition specifies a nested path (for instance, [a.b.y.__proto__.__proto__]), the loop resolves the prefix a.b.y. If a.b.y was previously defined as a scalar value (like a Number 1), resolving the field __proto__ returns the native prototype of that scalar (e.g., Number.prototype). The subsequent resolution of __proto__ accesses Object.prototype, where the compiler then writes arbitrary properties without verifying ownership of the destination dictionary. This behavior is termed Scalar Descent.

Code Analysis & Diff Evaluation

The patch implemented in version 4.1.2 mitigates this flaw by introducing a strict ownership mechanism and unifying path serialization helpers. Below is a structured analysis of the code-level modifications in lib/compiler.js.

// BEFORE THE PATCH:
var currentPath = "";
 
// AFTER THE PATCH:
var currentPath = [];
var ownedContainers = new WeakSet();
var data = createTable();

By tracking the current path as an array rather than an inline flat string, the compiler avoids the serialization desynchronization. The addition of the ownedContainers WeakSet provides a robust mechanism to differentiate between compiled TOML dictionaries and native JavaScript prototypes.

During traversal inside deepRef(), the patched code enforces strict object-ownership checks:

// Post-patch recursive lookup safety check:
if (i < keys.length - 1) {
  if (!isOwnedContainer(ctx)) {
    genError("Cannot redefine existing key '" + traversedPath + "'.", off);
  }
  if (ctx instanceof Array) {
    if (!ctx.length) {
      genError("Cannot redefine existing key '" + traversedPath + "'.", off);
    }
    ctx = ctx[ctx.length - 1];
    if (!isOwnedContainer(ctx)) {
      genError("Cannot redefine existing key '" + traversedPath + "'.", off);
    }
  }
}

These modifications successfully halt the traversal process if the parser descends into any object reference that is not explicitly registered within the ownedContainers set. Any attempt to access native prototypes will trigger a validation error, preventing modifications to parent object structures.

Exploitation Methodology & Payload Analysis

An attacker can exploit this flaw through two primary vectors. The first vector is through direct scalar descent, where a scalar value is declared and subsequently leveraged to reference ancestral prototypes. The second vector utilizes table arrays to bypass the parser's nesting constraints.

Consider the scalar descent exploit vector below. The payload first instantiates a scalar key y containing an integer, then immediately redefines a table using that key to walk back through the prototype chains:

[a.b]
y = 1
[a.b.y.__proto__.__proto__]
polluted = "yes"

When toml.parse() processes this payload, it creates the scalar y. Upon processing the subsequent table definition, deepRef() crawls into a.b.y, accesses (1).__proto__ to reach Number.prototype, and crawls again to reach Object.prototype. Finally, it sets Object.prototype.polluted = "yes", executing a successful system-wide modification.

Impact & Consequences Assessment

The impact of prototype pollution in Node.js depends heavily on other active libraries and application logic. If downstream code uses uninitialized objects or conducts unsafe merges of configuration hashes, an attacker can manipulate program flow control.

For example, if the application invokes subprocesses via child_process.spawn or child_process.fork, the runtime looks up properties on the options parameter. An attacker who has successfully polluted properties such as shell or env can force the application to execute arbitrary binary payloads. This transitions prototype pollution from a passive property injection directly into an unauthenticated remote execution scenario.

Additionally, polluting properties like toString, valueOf, or basic loop attributes can disrupt standard system functionality, leading to persistent denial of service (DoS) conditions where the entire Node.js server crashes upon loading.

Remediation and Defenses

The recommended approach to address this vulnerability is upgrading toml-node to version 4.1.2 or later. This version contains the complete rewrite of the path serialization engine and introduces runtime WeakSet ownership validation.

In scenarios where dependency upgrades are blocked, application operators can use CLI flags to secure the runtime environment. Running Node.js with the --disable-proto flag disables the __proto__ property completely across all native contexts:

node --disable-proto=delete app.js

Alternatively, developers can execute Object.freeze(Object.prototype) inside the main application entry point. This locks down the base dictionary against runtime modification, though it may trigger errors in legacy libraries that dynamically extend global prototypes. A mitigation function can also be used to filter incoming configuration streams for dangerous object keywords like __proto__ and constructor before forwarding the payload to the parser.

Fix Analysis (2)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
EPSS Probability
0.38%
Top 69% most exploited

Affected Systems

Applications utilizing toml-node for parsing untrusted user configuration filesNode.js server-side platforms processing TOML structures under versions < 4.1.2

Affected Versions Detail

Product
Affected Versions
Fixed Version
toml-node
BinaryMuse
< 4.1.24.1.2
AttributeDetail
CWE IDCWE-1321
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score8.2 (High)
Exploit StatusProof of Concept (PoC) available
KEV StatusNot Listed
EPSS Score0.00383
Impact CategoryIntegrity (High), Availability (Low)

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-1321
Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

The software receives input from an upstream component, but does not neutralize or incorrectly neutralizes special elements that could modify the system-wide prototype structure, enabling attackers to inject properties that alter base object structures.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory documenting official reproduction cases and vulnerable compiler mechanisms

Vulnerability Timeline

Patches implemented and unit tests added to the compiler core repository
2026-06-30
GitHub Security Advisory GHSA-v5mp-jgw5-2x6j and CVE-2026-63376 are officially published
2026-09-03
National Vulnerability Database (NVD) analyzes and indexes the prototype pollution flaw
2026-09-03

References & Sources

  • [1]NVD Vulnerability Details: CVE-2026-63376
  • [2]CVE-2026-63376 Record at CVE.org
  • [3]GHSA-v5mp-jgw5-2x6j GitHub Advisory
  • [4]OSV / CVE Project Vulnerability Data JSON File

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

•about 1 hour ago•CVE-2026-109618
9.8

CVE-2026-109618: Remote Code Execution in PHP Core via Out-of-Memory longjmp() Uninitialized Memory Access

CVE-2026-109618 (dubbed PHP2Shell) is a critical vulnerability in the PHP engine core resulting from improper out-of-memory exception handling via longjmp(). When request allocation fails mid-processing, non-local control flow bypasses cleanup procedures, leaving memory structures uninitialized or in a use-after-free state during request shutdown.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 1 hour ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
5 views•6 min read
•about 1 hour ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
3 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read