Description
Before JSONata 2.2.1 and 1.8.8 it was possible to execute arbitrary code with crafted expressions, due to a bypassable hasOwnProperty check in environment.lookup https://github.com/jsonata-js/jsonata/blob/8ee4476f8a228bfc7a62979ae0a9c13a4043cd03/src/jsonata.js#L1863-L1871
This was fixed in https://github.
Recommendation
Update the jsonata package to the latest compatible version. Followings are version details:
Affected version(s): **< 1.8.8 >= 2.0.0, < 2.2.1** Patched version(s): **1.8.8 2.2.1**
References
Could your website be exposed too?
SmartScanner can check your website for JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions - jsonata and gives you actionable findings to investigate.
Start a free scanRelated Issues
- JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions - CVE-2026-77415
- JSONata: Arbitrary Code Execution via crafted JSONata expressions - CVE-2026-77413
- React Editable Json Tree vulnerable to arbitrary code execution via function parsing - CVE-2022-36010
- Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code - CVE-2023-45133


