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

CVE-2026-77413: Remote Code Execution via Prototype Chain Bypass in JSONata Evaluator

Alon Barad
Alon Barad
Software Engineer

Aug 22, 2026·6 min read·40 visits

Executive Summary (TL;DR)

Unauthenticated remote code execution vulnerability in JSONata via prototype lookup chain traversal.

A critical prototype pollution and sandbox escape vulnerability was discovered in the JSONata query and transformation library before versions 1.8.8 and 2.2.0. By providing a malicious JSONata expression that bypasses ownership checks on object properties, remote attackers can execute arbitrary code in the context of the host Node.js application.

Vulnerability Overview

JSONata is a query and transformation language modeled on XPath that interprets queries and transformations against JSON input datasets. To evaluate expressions, JSONata compiles them into an Abstract Syntax Tree (AST) and steps through the nodes using its core evaluator engine. The engine acts as an interpreter, allowing users to define local variables, query specific fields, and invoke transformation operations. This flexibility requires strict sandbox boundaries when evaluating untrusted user queries.\n\nThe attack surface lies directly in the core evaluator's property resolution bottleneck. In standard Node.js environments, applications often evaluate query strings provided by external users or integrations. If these expressions are executed without safety boundaries, an attacker can access properties outside the scope of the local evaluation context. This behavior occurs because the evaluator performs raw property lookups on user-provided and internal JavaScript objects.\n\nThe vulnerability is classified under CWE-94 (Improper Control of Generation of Code or 'Code Injection'). Specifically, the engine's failure to validate object property ownership allows remote attackers to traverse the standard JavaScript prototype chain. By retrieving the global Function constructor, an adversary can compile and execute arbitrary JavaScript code inside the host process. This bypass leads to complete compromise of the hosting system's confidentiality, integrity, and availability.

Root Cause Analysis

The root cause of the vulnerability exists in JSONata's internal property resolution helper function, located in src/functions.js. During query evaluation, the engine resolves property keys using a central lookup routing function. This function takes an input object and a target key, and then returns the resolved value.\n\nIn JavaScript, all standard object instances inherit helper methods and meta-properties from Object.prototype. These properties include constructor, __proto__, __lookupSetter__, and __defineGetter__. When the lookup resolver evaluates an expression, it retrieves properties by directly indexing the object, e.g., using input[key]. Before the fix, the evaluator checked whether the input was an object and not a function, but it did not verify whether the key belonged to the object as an 'own' property.\n\nBecause of this omission, if a query references an inherited property such as constructor, the engine climbs up the prototype chain. The engine then returns the native prototype function or object to the evaluator scope. An attacker can construct a payload that chains these lookups. This chain moves from a standard object to the prototype accessor, and ultimately retrieves the global Function constructor. Once retrieved, the constructor serves as an execution vector to run arbitrary shell commands with the host process privileges.

Code Analysis

The vulnerability was resolved by introducing explicit property ownership validation in the central resolver in src/functions.js. Below is the code diff of the patch implemented in both the v1 and v2 branches:\n\njavascript\n// Vulnerable Property Lookup\n} else if (input !== null && typeof input === 'object' && !isFunction(input)) {\n result = input[key];\n}\nreturn result;\n\n// Patched Property Lookup\n} else if (input !== null && typeof input === 'object' && Object.prototype.hasOwnProperty.call(input, key) && !isFunction(input)) {\n result = input[key];\n}\nreturn result;\n\n\nThe inclusion of Object.prototype.hasOwnProperty.call(input, key) ensures that the engine only returns values defined directly on the input instance. If the key exists on the prototype chain (such as constructor), the check fails. The resolver then returns undefined instead of returning the inherited function.\n\nInvoking hasOwnProperty indirectly via Object.prototype.hasOwnProperty.call is critical for application stability. Objects created without a prototype, such as Object.create(null), do not inherit methods from Object.prototype. Checking them using input.hasOwnProperty(key) would throw a TypeError, causing the application to crash. The indirect call avoids this issue, ensuring safety across all object types.\n\nAdditionally, supplementary hardening was introduced in PR #806. All internal maps, binding contexts, and regex lookup tables were refactored to use prototype-less objects created with Object.create(null). The maintainers also replaced for...in loops, which naturally traverse prototype properties, with direct Object.keys() iterations. Finally, they blacklisted internal variable prefixes like _jsonata_ to prevent injection vectors.

Exploitation Methodology

Exploitation is achieved by constructing a specific JSONata query that traverses the prototype chain to execute system commands. The sequence uses JavaScript's capability to override or access setters and getters on standard objects.\n\nFirst, the attacker executes __lookupSetter__('__proto__')(constructor) inside the query. This retrieves a reference to the global Function constructor from the prototype chain. Next, the attacker invokes this constructor to compile a dynamic shell payload. The payload retrieves the Node.js child_process module to run commands:\n\njavascript\nconstructor(\"return process.getBuiltinModule('child_process').execSync('id').toString()\")\n\n\nThe compiled payload is then bound as a getter named 'l' on the prototype of standard objects using __defineGetter__('l', ...). Finally, evaluating valueOf().l triggers the getter. This executes the system command within the context of the host process, returning the command output directly to the attacker.\n\nThis attack is highly operationalizable because it requires no specialized local environment variables, user authentication, or specific target configurations. The only prerequisite is that the host application must evaluate user-controlled JSONata expressions using standard runtime contexts. The execution flow can be visualized using the following flow chart:\n\nmermaid\ngraph LR\n A[\"Malicious JSONata Expression\"] --> B[\"Evaluate Expression\"]\n B --> C[\"Call __lookupSetter__('__proto__')(constructor)\"]\n C --> D[\"Access Global Function Constructor\"]\n D --> E[\"Bind Custom Getter 'l' with child_process Payload\"]\n E --> F[\"Trigger valueOf().l\"]\n F --> G[\"Execute Shell Command via host Node.js process\"]\n

Impact Assessment

The potential impact of CVE-2026-77413 is high. Because the JSONata evaluation runs directly within the Node.js runtime process, a successful escape gives the attacker full control of the hosting application. The attacker can execute arbitrary operating system commands, read sensitive system files, access environment variables, or establish persistent backdoors.\n\nThis vulnerability has been assigned a CVSS v4.0 Base Score of 9.3 (Critical). The CVSS vector is 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. This score reflects that no prior authentication, user interaction, or specialized network conditions are required to trigger execution.\n\nFurthermore, the blast radius is extended because JSONata is commonly deployed in low-code integration platforms, database transformation pipelines, and API gateways. In these environments, applications often evaluate expressions supplied by end-users or third-party webhooks. A compromise in these locations can lead to lateral movement, data exfiltration, or access to cloud metadata services.

Mitigation and Remediation

The primary remediation strategy is upgrading the JSONata library to a secure version. For systems on the v1.x release branch, administrators must upgrade to version 1.8.8 or higher. For systems on the v2.x release branch, administrators must upgrade to version 2.2.0 or higher.\n\nIn addition to upgrading, developers should implement execution guardrails introduced in version 2.2.0. These guardrails restrict runtime resources, helping prevent denial-of-service vectors like exponential backtracking or infinite loops. Below is an example of configuring these safety options:\n\njavascript\nimport jsonata from 'jsonata';\n\nconst options = {\n stack: 500, // Recursion limit\n timeout: 1000, // 1-second timeout\n sequence: 10000 // Intermediate allocation limit\n};\n\nconst expression = jsonata(userInput, options);\nconst result = await expression.evaluate(data);\n\n\nIf immediate patching is not possible, applications should block any JSONata expressions containing keywords linked to prototype access. These keywords include __proto__, constructor, prototype, __lookupSetter__, and __defineGetter__. However, keyword blocking is prone to bypasses and should only be used as a temporary workaround until the package is updated.

Official Patches

JSONata GitHubV2 Release Branch Fix Commit (PR #794)
JSONata GitHubV1 Backport Patch Commit (PR #815)

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 packageNode.js applications evaluating untrusted JSONata queries
AttributeDetail
CWE IDCWE-94
Attack VectorNetwork
CVSS Score9.3 (Critical)
EPSS ScoreN/A
ImpactUnauthenticated Remote Code Execution
Exploit StatusProof of Concept (PoC) documented
KEV StatusNot Listed
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 it is executed.

Known Exploits & Detection

GitHub AdvisoryProof of concept showing how standard prototype properties can retrieve the global Function constructor to run arbitrary commands via process.getBuiltinModule.

Vulnerability Timeline

OIDC-based package publishing and initial commits integrated.
2026-05-14
Systematic environment hardening merged (PR #806 / Commit f09df8416eab8ff44926fc6527c80fb8701de159).
2026-07-15
JSONata versions 1.8.8 and 2.2.0 released.
2026-07-16
GitHub Advisory published and CVE-2026-77413 registered.
2026-08-21

References & Sources

  • [1]GHSA-8gq3-vp5j-2grp
  • [2]NVD Detail - CVE-2026-77413
  • [3]CVE.org - CVE-2026-77413
  • [4]JSONata v1.8.8 Release Notes
  • [5]JSONata v2.2.0 Release Notes

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

•17 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