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·3 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

•14 minutes ago•CVE-2026-68508
7.8

CVE-2026-68508: Arbitrary Code Execution via Unsafe Dynamic Instantiation in Hydra Core

CVE-2026-68508 is a high-severity arbitrary code execution vulnerability in facebookresearch/hydra (hydra-core) prior to version 1.3.4. The vulnerability exists within the dynamic instantiation system hydra.utils.instantiate(), which resolves and executes arbitrary Python callables from configuration files. An attacker capable of submitting untrusted configurations can achieve arbitrary code execution in the context of the consuming process.

Alon Barad
Alon Barad
1 views•7 min read
•about 2 hours ago•CVE-2026-77414
9.3

CVE-2026-77414: Critical Sandbox Escape and Remote Code Execution in JSONata via Prototype Pollution

CVE-2026-77414 (GHSA-2943-5xfg-gq5f) is a critical sandbox escape and remote code execution vulnerability in the JSONata package. When JSONata processes untrusted expressions, it uses a vulnerable environment lookup check that can be shadowed by user-defined variables. Attackers can leverage this to traverse the prototype chain, reach the global Function constructor, and execute arbitrary system commands on the host machine.

Alon Barad
Alon Barad
7 views•7 min read
•about 3 hours ago•GHSA-8HGV-XC77-JMCR
9.0

GHSA-8HGV-XC77-JMCR: Privilege Escalation to Super-Admin via Twig Sandbox Escape and Stored XSS in Grav CMS Assets

An overly permissive default configuration in the Grav CMS Twig sandbox combined with a lack of neutralization of double-quote characters in the Asset rendering engine allows low-privileged page editors to inject malicious JavaScript into administrative contexts. This leads to a stored cross-site scripting (XSS) condition that compromises the sessions of super-administrators, facilitating complete privilege escalation.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•GHSA-8CFW-PCWH-V63W
8.5

GHSA-8CFW-PCWH-V63W: Authenticated Twig Sandbox Escape and Remote Code Execution in Winter CMS

An authenticated Twig sandbox escape vulnerability in Winter CMS allows users with template-editing privileges to bypass sandbox restrictions and execute arbitrary PHP code. This vulnerability represents a complete bypass of the sandbox protections introduced by the previous patch for CVE-2024-54149.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 5 hours ago•GHSA-Q9C5-PP7M-FM2G
5.3

GHSA-Q9C5-PP7M-FM2G: Missing Authorization in Fleet Enterprise iOS Application Distribution Endpoints

A missing authorization vulnerability in Fleet device management software allows unauthenticated remote attackers to access proprietary enterprise iOS packages (.ipa) and manifest configurations by scanning predictable integer identifiers.

Alon Barad
Alon Barad
2 views•7 min read
•about 7 hours ago•CVE-2026-59995
4.2

CVE-2026-59995: Relative Path Traversal in OpenSSH sftp Client

A relative path traversal vulnerability (CWE-23) in the client-side sftp utility of OpenSSH before version 10.4 allows malicious or compromised SFTP servers to write or overwrite files outside the intended destination directory when a user executes a direct one-shot download command.

Amit Schendel
Amit Schendel
7 views•6 min read