# CVE-2026-77414: JSONata: Arbitrary Code Execution via crafted JSONata expressions

The Markdown version of <https://upatch.dev/cve/CVE-2026-77414>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-77414 is rated Critical 9.3 (CVSS 4.0, 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects JSONata (jsonata-js) and was published on 21 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.6%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-77414-exec-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-77414, "Arbitrary Code Execution via crafted JSONata expressions" (GHSA-2943-5xfg-gq5f), was published on 21 August 2026. Prior to JSONata 1.8.8 and 2.2.1, the `src/jsonata.js` `environment.lookup` function used a bypassable `hasOwnProperty` check (`bindings.hasOwnProperty(name)`). Crafted JSONata expressions could use `$hasOwnProperty`, `$spread`, `$string`, prototype access, and `$constructor` to reach the JavaScript `Function` constructor and invoke `process.getBuiltinModule('child_process')` to execute arbitrary OS commands with the privileges of the host Node.js process.

### Official description

JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.1, the src/jsonata.js environment.lookup function used a bypassable hasOwnProperty check. Crafted expressions could use $hasOwnProperty, $spread, $string, prototype access, and $constructor to reach the object prototype and invoke process.getBuiltinModule with child_process, executing arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.1.

## What the upatch does

One BPF LSM program attaches to `lsm/bprm_check_security` and returns `-EPERM` when the calling task's executable (`current->mm->exe_file->f_path.dentry`) is named `node`:

| Hook                      | Refused                                                                                       |
| ------------------------- | --------------------------------------------------------------------------------------------- |
| `lsm/bprm_check_security` | Executing a new program (`execve` / `execveat`) when the calling process executable is `node` |

JSONata is an in-process JSON query and transformation library that never spawns child processes during normal expression evaluation. When a crafted expression reaches `Function` and calls `child_process` to spawn a shell or external binary, the kernel calls `security_bprm_check()` in the forked child before replacing its `mm->exe_file` (`node`). The upatch refuses that transition with `-EPERM`, while leaving every other process on the machine (such as `sshd`, `bash`, and system services) untouched. A refusal from an earlier BPF LSM program on the same hook is preserved.

The `refused` per-CPU array counts refused execution attempts at key 0.

The policy: [`cve-2026-77414-exec-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-77414), 64 lines of BPF C attached at `lsm/bprm_check_security`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Any `node` process on the machine cannot spawn external child processes via `execve` (for example through Node's `child_process.execSync`, `child_process.execFileSync`, or `child_process.spawn`).
- Pure JavaScript evaluation, JSONata queries and transformations, network I/O, and file system operations inside Node.js continue to work normally.
- Not covered: in-process actions that do not call `execve` (such as reading or writing files directly through Node's `fs` module), or a Node.js runtime binary renamed to something other than `node`.

## Preemption model and cost

The program keeps no shared state beyond the per-CPU refusal counter, which it updates with `__sync_fetch_and_add`, so it is safe under every preemption model including preemptible RCU (`PREEMPT_LAZY`, `PREEMPT_DYNAMIC`) and `PREEMPT_RT`. The hook runs only on `execve`, not on file opens or syscalls at large, and checks `d_name.len == 4` on the current task's executable dentry before reading the 4-byte name.

## Affected versions

JSONata:

| Branch | Affected       | Fixed in |
| ------ | -------------- | -------- |
| 2.x    | 2.0.0 to 2.2.0 | 2.2.1    |
| 1.x    | prior to 1.8.8 | 1.8.8    |

Kernels: any Linux kernel supported by shirudo with BPF LSM and BTF enabled (`lsm/bprm_check_security` takes `struct linux_binprm *bprm`).

## How it was tested

On a vulnerable JSONata 2.2.0 service running on Node.js, the loaded upatch refused child process execution triggered through the environment.lookup prototype bypass while normal JSONata evaluation continued to work.

- **Tested:** 25 Nov 2026
- **Target:** JSONata 2.2.0 on Node.js, evaluating expressions over HTTP on 127.0.0.1:18080
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | Crafted expression spawns /bin/true | Normal JSONata expression evaluation |
| --------------- | ----------------------------------- | ------------------------------------ |
| Before loading  | yes (reached)                       | yes                                  |
| Upatch loaded   | no (blocked with EPERM)             | yes                                  |
| After unloading | yes (reached)                       | yes                                  |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-77414
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-77414-1.0.0.bee oci://<registry>/<namespace>/cve-2026-77414 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-77414-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-77414 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-77414)
- [GitHub Security Advisory GHSA-2943-5xfg-gq5f](https://github.com/jsonata-js/jsonata/security/advisories/GHSA-2943-5xfg-gq5f)
- [Fix pull request #799](https://github.com/jsonata-js/jsonata/pull/799) and [commit 59e25144fc3b](https://github.com/jsonata-js/jsonata/commit/59e25144fc3b7125f6befd71b8a6e14e1fa610d2)
- Releases: [v2.2.1](https://github.com/jsonata-js/jsonata/releases/tag/v2.2.1) and [v1.8.8](https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8)

### Links

- [CVE-2026-77414 on upatch.dev](https://upatch.dev/cve/CVE-2026-77414) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-77414)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-77414)
- [CWE-94](https://cwe.mitre.org/data/definitions/94.html)
- Upatch source: [upatches/cve-2026-77414](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-77414)

### More references from NVD (5)

- [github.com](https://github.com/jsonata-js/jsonata/commit/59e25144fc3b7125f6befd71b8a6e14e1fa610d2)
- [github.com](https://github.com/jsonata-js/jsonata/pull/799)
- [github.com](https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8)
- [github.com](https://github.com/jsonata-js/jsonata/releases/tag/v2.2.1)
- [github.com](https://github.com/jsonata-js/jsonata/security/advisories/GHSA-2943-5xfg-gq5f)
