Vulnerability library
Security checkAugust 21, 2026

JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmjsonata

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Before JSONata 2.2.1 and 1.8.8 it was possible to execute arbitrary code with crafted expressions, due to:

  • overwriting $clone allowing mutation of objects via transforms (see evaluateTransformExpression)
  • it being possible to destruct jsonata functions/lambdas (e.g. $merge.*)
  • applyProcedure using proc.arguments.forEach and not `Array.prototype.

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 and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated August 21, 2026