Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-12208

CVE-2026-12208: jsonata-js jsonata RCE Vulnerability

CVE-2026-12208 is a remote code execution flaw in jsonata-js jsonata up to version 2.0.0, exploiting prototype pollution in the createFrame function. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-12208 Overview

CVE-2026-12208 is a prototype pollution vulnerability in the jsonata-js library through version 2.2.0. The flaw resides in the createFrame function within src/jsonata.js, which is part of the Function Binding Frame System. The issue allows improperly controlled modification of object prototype attributes [CWE-94], enabling remote attackers to influence application logic by polluting shared JavaScript object prototypes. A public proof-of-concept exploit exists, and the vendor did not respond to early disclosure attempts. JSONata is widely embedded in data transformation pipelines, integration platforms, and serverless workflows, increasing the practical reach of the issue.

Critical Impact

Remote attackers can pollute JavaScript object prototypes through crafted JSONata expressions, potentially altering downstream application logic without authentication or user interaction.

Affected Products

  • jsonata-js jsonata versions up to and including 2.2.0
  • Applications embedding the JSONata expression engine for user-supplied queries
  • Node.js services and serverless functions performing JSON transformations with JSONata

Discovery Timeline

  • 2026-06-15 - CVE-2026-12208 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2026-12208

Vulnerability Analysis

The vulnerability lives in the createFrame routine that constructs binding frames used to resolve variables and functions during JSONata expression evaluation. The function fails to guard prototype-bearing keys such as __proto__, constructor, and prototype when copying or assigning attributes onto frame objects. A crafted expression can therefore reach Object.prototype and modify attributes shared across every plain object in the runtime. Because JSONata is commonly used to evaluate expressions sourced from configuration, API requests, or low-trust tenants, the attack surface extends to any application that hands attacker-influenced input to the engine.

Root Cause

The root cause is missing key filtering during frame property assignment in src/jsonata.js. The createFrame implementation treats prototype-related property names as regular bindings rather than reserved identifiers. Without an Object.create(null) backing store or an explicit allowlist, assignment recurses into Object.prototype and persists for the lifetime of the process. This pattern matches the broader class tracked under [CWE-94] for improperly controlled modification of dynamically determined object attributes.

Attack Vector

Exploitation occurs remotely over the network with no authentication and no user interaction. An attacker submits a JSONata expression or input document that traverses keys leading into __proto__ and assigns a chosen value. Subsequent objects in the host application inherit the polluted attribute, which can flip authorization flags, override default options, or alter control flow in security-sensitive code paths. The public proof of concept hosted at the GitHub PoC Repository demonstrates a hasOwnProperty bypass leveraging this primitive.

No verified exploit code is reproduced here. Refer to the VulDB entry for CVE-2026-12208 and the linked PoC repository for full technical detail.

Detection Methods for CVE-2026-12208

Indicators of Compromise

  • Inbound HTTP request bodies or query parameters containing the strings __proto__, constructor.prototype, or prototype within JSONata expressions.
  • Application logs showing unexpected attributes appearing on plain objects after JSONata evaluation, such as flags resolving to attacker-controlled values.
  • Node.js processes loading jsonata at versions <=2.2.0 while exposing expression input to untrusted sources.

Detection Strategies

  • Inspect inputs delivered to any jsonata(expr).evaluate(data) call for prototype-pollution payload patterns at the application or WAF layer.
  • Add runtime assertions verifying that Object.prototype has not been mutated between request boundaries in long-lived Node.js services.
  • Audit dependency manifests (package-lock.json, yarn.lock, SBOMs) for jsonata versions at or below 2.2.0.

Monitoring Recommendations

  • Forward Node.js application logs and HTTP request bodies to a centralized analytics pipeline and alert on prototype-pollution indicator strings.
  • Track outbound behavior changes from services that consume JSONata expressions, including unexpected authorization decisions or configuration drift.
  • Monitor software composition analysis findings for the jsonata package and trigger tickets when vulnerable versions are detected.

How to Mitigate CVE-2026-12208

Immediate Actions Required

  • Inventory all services and serverless functions that include the jsonata package and identify those running version 2.2.0 or earlier.
  • Restrict JSONata expression evaluation to trusted, authenticated callers until a patched release is deployed.
  • Validate and reject input keys matching __proto__, constructor, or prototype before passing data to the evaluator.

Patch Information

At the time of NVD publication on 2026-06-15, the jsonata-js maintainers had not responded to disclosure outreach according to the VulDB advisory. Consumers should monitor the upstream jsonata-js/jsonata repository on GitHub for a fixed release above 2.2.0 and upgrade promptly when available.

Workarounds

  • Wrap JSONata evaluation in a sandboxed worker or isolated process so prototype pollution does not affect the main application context.
  • Freeze critical prototypes at process startup using Object.freeze(Object.prototype) and Object.freeze(Object.getPrototypeOf({})) where compatible with application code.
  • Apply a deny-list filter on incoming JSON payloads to strip keys named __proto__, constructor, and prototype before evaluation.
  • Enforce strict schema validation on inputs supplied to JSONata expressions to limit attacker-controlled key names.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.