CVE-2026-77414: Jsonata JSONata Vulnerable To Arbitrary Code Vulnerability
CRITICALCVE-2026-77414 is a CRITICAL jsonata vulnerable to arbitrary code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Jsonata libraries in the npm ecosystem. The issue involves jsonata vulnerable to arbitrary code execution via crafted jsonata expressions. Remediation is available by upgrading affected packages to version 2.2.1, 1.8.8.
CVE-2026-77414 at a Glance
How to Fix CVE-2026-77414
To remediate this vulnerability, upgrade all affected Jsonata dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsonata@2.2.1
npm install jsonata@1.8.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsonata
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-77414, inspect your project dependencies using npm:
npm ls jsonata
Analyze the terminal output to locate any version of Jsonata in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), your application is affected.
Note: The npm ls jsonata command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Jsonata, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-77414 Affected Jsonata Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsonata
|
npm |
≥ 2.0.0
< 2.2.1
|
2.2.1
|
|
jsonata
|
npm |
< 1.8.8
|
1.8.8
|
References
Frequently Asked Questions
What is CVE-2026-77414?
Which Jsonata versions are affected?
What version fixes CVE-2026-77414?
Is jsonata affected?
What CWE is associated with CVE-2026-77414?
How can I check npm dependencies for CVE-2026-77414?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2943-5xfg-gq5f",
"modified" : "2026-08-21T20:58:01Z",
"published" : "2026-08-21T20:58:01Z",
"aliases" : [ "CVE-2026-77414" ],
"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\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```",
"severity" : [ {
"type" : "CVSS_V4",
"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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsonata"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "jsonata"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.8"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-21T20:58:01Z",
"nvd_published_at" : null
}
}