# CVE-2026-77413: JSONata arbitrary code execution in lookup function

Source: https://junglewise.ai/threats/cve-2026-77413-jsonata-arbitrary-code-execution-in-lookup-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-77413 · Severity: critical · CVSS 4 · Published 2026-08-21

JSONata is a JavaScript library used to query and transform JSON data. Due to missing input validation in the lookup function, an attacker can craft specially designed JSONata expressions that execute arbitrary code on the system running the application. This allows complete compromise of any application using vulnerable versions of JSONata.

Technologies: [JSONata](https://junglewise.ai/threats/technologies/jsonata), [jsonata (npm)](https://junglewise.ai/threats/technologies/npm-jsonata). Vendors: [JSONata](https://junglewise.ai/threats/vendors/jsonata), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-77413 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-77413 being exploited in the wild.

**How severe is CVE-2026-77413?** Critical severity, with a CVSS score of 4, published 21 August 2026.

**Which products and versions are affected?** JSONata <= 1.8.7, >= 2.0.0 and < 2.2.0; jsonata (npm) SEMVER:introduced=0,fixed=1.8.8.

**Is there a fix for CVE-2026-77413?** Yes. jsonata (npm): upgrade to 1.8.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-77413 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-77413?** Check whether you run JSONata or jsonata (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- jsonata (npm): upgrade to 1.8.8 or later

  ```sh
  npm install jsonata@1.8.8
  ```


## Technical details

The vulnerability is a code injection flaw (CWE-94) in JSONata's lookup function that fails to properly validate expressions before evaluation. The root cause is a missing hasOwnProperty check at lines 1686-1705 of functions.js, which allows attackers to access and manipulate prototype objects via __proto__ and constructor gadgets. An attacker can craft a JSONata expression that bypasses sandbox restrictions and executes arbitrary shell commands through process.getBuiltinModule('child_process'). The attack requires only the ability to provide input to the jsonata() expression parser—no prior authentication or privileges are required. The vulnerability affects JSONata versions up to 1.8.7 and 2.0.0–2.1.x, and is patched in versions 1.8.8 and 2.2.0.

## Affected products

- JSONata JS JSONata <= 1.8.7, >= 2.0.0 and < 2.2.0

## Identifiers

- CVE-2026-77413
- GHSA-8gq3-vp5j-2grp

## Timeline

- 2026-07-13: disclosed
- 2026-08-21: patched: Versions 1.8.8 and 2.2.0 released with fix
- 2026-08-21: advisory: GitHub Advisory Database published

## References

- [https://api.github.com/users/peaktwilight](https://api.github.com/users/peaktwilight)
- [https://github.com/peaktwilight](https://github.com/peaktwilight)
- [https://api.github.com/users/peaktwilight/gists%7B/gist_id%7D](https://api.github.com/users/peaktwilight/gists%7B/gist_id%7D)
- [https://api.github.com/users/peaktwilight/repos](https://api.github.com/users/peaktwilight/repos)
- [https://avatars.githubusercontent.com/u/77903714?v=4](https://avatars.githubusercontent.com/u/77903714?v=4)
- [https://api.github.com/users/peaktwilight/events%7B/privacy%7D](https://api.github.com/users/peaktwilight/events%7B/privacy%7D)

## Related threats

- [JSONata arbitrary code execution via crafted expressions](https://junglewise.ai/threats/cve-2026-77415-jsonata-arbitrary-code-execution-via-crafted-expressions)
- [JSONata arbitrary code execution via expression injection](https://junglewise.ai/threats/cve-2026-77414-jsonata-arbitrary-code-execution-in-expression-evaluation)
- [jsonata-js JSONata Denial of Service in $toMillis function](https://junglewise.ai/threats/cve-2026-52746-jsonata-js-jsonata-denial-of-service-in-tomillis-function)
- [JSONata prototype pollution in createFrame function](https://junglewise.ai/threats/cve-2026-12208-jsonata-prototype-pollution-in-createframe-function)
- [JSONata prototype pollution via transform operator](https://junglewise.ai/threats/cve-2024-27307-jsonata-prototype-pollution-via-transform-operator)
