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

CVE-2026-77415: Sandbox Escape and Arbitrary Code Execution in JSONata Engine

Alon Barad
Alon Barad
Software Engineer

Aug 21, 2026·6 min read·105 visits

Executive Summary (TL;DR)

CVE-2026-77415 is a critical sandbox escape in JSONata enabling remote code execution by chaining object-integrity and prototype-related weaknesses to hijack internal AST structures.

A critical sandbox escape vulnerability in JSONata versions prior to 1.8.8 and 2.2.1 allows unauthenticated remote attackers to execute arbitrary code on the host machine. By submitting crafted JSONata expressions, an attacker can manipulate internal AST structures, bypass object clone helpers, spoof native function flags, and escape the evaluation environment to execute system commands through the Node.js runtime.

Vulnerability Overview

JSONata is a lightweight query and transformation language designed for JSON data structures, commonly integrated within Node.js applications to filter, map, and manipulate data streams. Because JSONata is frequently deployed in multi-tenant environments—such as low-code platforms, integrations, and message brokers—the engine implements execution sandboxing boundaries. These boundaries are intended to prevent evaluated expressions from accessing parent process contexts or underlying system resources.

CVE-2026-77415 represents a complete failure of these sandboxing boundaries in JSONata versions prior to 1.8.8 (v1 branch) and 2.2.1 (v2 branch). The vulnerability corresponds to CWE-94: Improper Control of Generation of Code ('Code Injection'). By supplying a malformed expression, an attacker can execute arbitrary system commands within the privileges of the host Node.js application.

The attack surface is exposed in any endpoint or service that parses and evaluates user-controlled JSONata expressions. Because execution does not depend on elevated privileges or complex application configurations, this vulnerability poses a high risk of remote code execution on affected host environments.

Root Cause Analysis

The sandbox escape in CVE-2026-77415 is executed by chaining five distinct object-integrity and reference weaknesses in the JSONata interpreter. The first primitive involves bypassing JSONata's internal object cloning logic. To preserve input immutability, JSONata relies on an internal $clone utility. However, the evaluation context allows attackers to shadow or override this utility with a custom identity function: $clone := function($o) { $o }. Subsequent transformation loops then retrieve live references to the engine's internal evaluation structures instead of safe copies, granting direct mutation capabilities.

The second primitive leverages wildcards (.*) and descendant (**) operators to bypass lambda function encapsulation. The interpreter checks for traversable structures using typeof input === 'object'. Because functions evaluate as objects in JavaScript, this check allows the traversal of function properties. Attackers can leverage this to read and extract the internal properties of functions, such as the parsed AST structures and execution parameters.

Thirdly, the function execution logic in applyProcedure evaluated steps by directly calling the forEach method on proc.arguments. Because the array structure of arguments can be manipulated and shadowed via the cloned object mutations, the attacker can hijack this call. By redefining forEach to point to a custom method, the interpreter's native execution flow is rerouted into the attacker's execution scope. This allows the attacker to traverse the host's V8 prototype chain, retrieve the global execution context, and run arbitrary system commands.

Code Analysis

To understand the structural causes of CVE-2026-77415, we must examine the differences in object instantiation and property verification. In vulnerable versions, internal objects like variables, bindings, and matched patterns were declared as standard JavaScript object literals ({}). These literals inherit properties from Object.prototype, which exposes them to prototype pollution and property shadowing attacks.

The remediation steps implemented in PR #799 and PR #806 address this issue by substituting object literals with prototype-less structures generated via Object.create(null). Method invocations on external inputs were also refactored to use static prototype dispatches instead of dynamic, instance-based calls:

// PRE-PATCH (jsonata.js)
const wordValues = {};
var matcher = {};
var bindings = {};
 
if (expr.hasOwnProperty('group')) { ... }
proc.arguments.forEach(function (param, index) { ... });
 
// POST-PATCH (jsonata.js)
const wordValues = Object.create(null);
var matcher = Object.create(null);
var bindings = Object.create(null);
 
if (Object.prototype.hasOwnProperty.call(expr, 'group')) { ... }
Array.prototype.forEach.call(proc.arguments, function (param, index) { ... });

To address wildcard traversal leaks (PR #800), the recursive structure checking logic in src/jsonata.js was modified. The updated code prevents wildcards from accessing properties within function objects by introducing an explicit check via !isFunction(input):

// PRE-PATCH (jsonata.js)
if (input !== null && typeof input === 'object') {
    Object.keys(input).forEach(function (key) { ... });
}
 
// POST-PATCH (jsonata.js)
if (input !== null && typeof input === 'object' && !isFunction(input)) {
    utils.keys(input).forEach(function (key) { ... });
}

Lastly, to prevent attackers from mimicking native lambda states, PR #802 added strict validation rules. Any attempts to write keys containing internal identifiers like _jsonata_lambda or _jsonata_function within a parsed expression are rejected, throwing error code D1013 during compilation.

Exploitation Methodology

An attack scenario begins with an unauthenticated remote user identifying an endpoint that processes JSONata expressions. The attacker supplies a payload designed to exploit the mutation and shadowing flaws. First, the payload overrides the clone routine to obtain a direct pointer to internal objects during a transformation step.

Next, the attacker utilizes the descendant operators to parse the internal structures of an existing system function. This leaks critical metadata which is then utilized to construct a fake lambda object. The attacker injects the private _jsonata_lambda: true key and defines an override for the forEach property.

During evaluation, the JSONata engine encounters the fake lambda and invokes the customized forEach routing. This switches execution context to standard Node.js prototype properties (such as __proto__ and constructor). From here, the attacker constructs a generic callback pointing to Function constructors, resolving the global process object or loading modules like child_process to execute arbitrary system commands.

Impact Assessment

A successful exploit of CVE-2026-77415 results in complete system compromise. Because the sandbox escape allows access to Node's global V8 context, the execution environment can load standard libraries to perform file writes, establish reverse shells, or modify active memory spaces. This impacts system confidentiality, integrity, and availability.

If the host application executes within a container without strict resource constraints, attackers can escalate privileges or pivot to other systems inside the network. This risk is amplified because JSONata is often used to parse dynamic workflows within integration layers and middleware.

The vulnerability does not require authentication or user interaction to execute. The lack of preconditions makes this an ideal target for automated exploitation when exposed to public-facing networks.

Mitigation & Hardening

The primary remediation strategy for CVE-2026-77415 is upgrading to the patched releases. For deployments using the v1 ecosystem, upgrade the dependency to 1.8.8 or higher. For deployments using the v2 ecosystem, upgrade to 2.2.1 or higher. Verify installation and enforce updates using dependency auditing tools.

In addition to upgrading, developers should enforce runtime limitations during initialization. JSONata versions 2.2.0 and above support execution options to restrict resource consumption. Specifying maximum call stack depths and execution timeouts provides defense-in-depth against resource exhaustions and potential sandbox variants:

const jsonata = require('jsonata');
 
const options = {
    stack: 500,        // Mitigates deep call recursion
    timeout: 1000,     // Aborts execution after 1000ms
    sequence: 100000   // Restricts array allocation limits
};
 
const expression = jsonata(untrustedExpression, options);

Deploying Node.js processes within minimal, unprivileged container instances with read-only root filesystems is also recommended. This ensures that even if an execution escape occurs, command execution capabilities are heavily restricted by kernel policies and namespace isolation.

Fix Analysis (5)

Technical Appendix

CVSS Score
9.3/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Systems

JSONata NPM package (jsonata)

Affected Versions Detail

Product
Affected Versions
Fixed Version
jsonata
JSONata
< 1.8.81.8.8
jsonata
JSONata
>= 2.0.0, < 2.2.12.2.1
AttributeDetail
CWE IDCWE-94: Improper Control of Generation of Code ('Code Injection')
Attack VectorNetwork (AV:N)
CVSS v4.09.3 (Critical)
Exploit StatusProof-of-Concept Primitives Documented
KEV StatusNot Listed
Affected Versions< 1.8.8, >= 2.0.0, < 2.2.1

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1203Exploitation for Client Execution
Execution
CWE-94
Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection')

Known Exploits & Detection

GitHub Security AdvisoryAdvisory detailing sandbox escape primitives and mitigations

Vulnerability Timeline

Release of JSONata v2.2.0 (Milestone release introducing resource guardrails)
2026-05-14
Commit for prototype pollution hardening merged into master branch
2026-05-15
Commit restricting wildcard traversal on function objects merged
2026-05-18
Commit blocking user-defined internal flags merged
2026-05-19
JSONata version v2.2.1 released with security patches
2026-05-19
Backporting of security fixes to v1 branch completed
2026-07-15
JSONata version v1.8.8 released with security backports
2026-07-16
Public disclosure of CVE-2026-77415 and GHSA advisory publication
2026-08-21

References & Sources

  • [1]CVE-2026-77415 on CVE.org
  • [2]GitHub Security Advisory GHSA-66mm-25pp-rfff
  • [3]Official Fix Commit - v2 Prototype Hardening
  • [4]Official Fix Commit - v2 Wildcard Filtering
  • [5]Official Fix Commit - v2 Flag Blocking
  • [6]Official Fix Commit - v1 Backport Hardening
  • [7]Official Fix Commit - v1 Backport Implementation

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

•2 minutes 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
1 views•6 min read
•5 minutes 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
1 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
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read