jsonata npm Package Vulnerability: Arbitrary Code Execution Risk
- Severity
- HIGH
- Affected component
- jsonata (npm)
- Affected versions
- >= 2.0.0, < 2.2.1 or < 1.8.8 or >= 2.0.0, < 2.2.0 or < 1.8.9 or < 1.8.8 or >= 2.0.0, < 2.2.0 or >= 1.4.0, < 1.8.7 or >= 2.0.0, < 2.0.4
- Patched version
- 2.2.0 || 1.8.8
The jsonata npm package is under investigation for a vulnerability that may allow arbitrary code execution in versions before 2.2.0 and 1.8.8 due to a missing hasOwnProperty check in the lookup function.
What happened
An early warning has been issued regarding a critical vulnerability in the jsonata npm package. This vulnerability, tracked as GHSA-8GQ3-VP5J-2GRP, reportedly allows arbitrary code execution in affected versions due to a missing hasOwnProperty check in the lookup function. The vulnerability has been addressed in the latest releases, jsonata@2.2.0 and jsonata@1.8.8.
Affected versions include jsonata >= 2.0.0, < 2.2.1 or < 1.8.8 or >= 2.0.0, < 2.2.0 or < 1.8.9 or < 1.8.8 or >= 2.0.0, < 2.2.0 or >= 1.4.0, < 1.8.7 or >= 2.0.0, < 2.0.4. Users of these versions are advised to upgrade to mitigate the risk.
What to do about it
- Upgrade to jsonata@2.2.0 or jsonata@1.8.8 to mitigate the risk of arbitrary code execution.
- Review your project dependencies to identify any use of affected jsonata versions.
- Monitor the provided sources for updates on the vulnerability and any additional patches that may be released.
How 0Day would have caught this
jsonata is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.
Frequently asked questions
Am I affected?
You are affected if you are using jsonata >= 2.0.0, < 2.2.1 or < 1.8.8 or >= 2.0.0, < 2.2.0 or < 1.8.9 or < 1.8.8 or >= 2.0.0, < 2.2.0 or >= 1.4.0, < 1.8.7 or >= 2.0.0, < 2.0.4.
What should I do right now?
Upgrade to jsonata@2.2.0 or jsonata@1.8.8 to mitigate the risk.
Has this vulnerability been exploited in the wild?
There is no confirmed report of this vulnerability being exploited in the wild at this time.
Sources
- [GHSA-2943-5xfg-gq5f] JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions
- [GHSA-66mm-25pp-rfff] JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions
- [GHSA-8gq3-vp5j-2grp] JSONata: Arbitrary Code Execution via crafted JSONata expressions
- [GHSA-2943-5xfg-gq5f] JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions