CVE-2026-1615: Jsonpath Jsonpath Has Arbitrary Code Injection Vulnerability
HIGHCVE-2026-1615 is a HIGH (CVSS 9.8) jsonpath has arbitrary code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Jsonpath libraries in the npm ecosystem. The issue involves jsonpath has arbitrary code injection via unsafe evaluation of json path expressions. Remediation is available by upgrading affected packages to version 1.3.0.
CVE-2026-1615 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-1615
To remediate this vulnerability, upgrade all affected Jsonpath 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 jsonpath@1.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsonpath
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-1615, inspect your project dependencies using npm:
npm ls jsonpath
Analyze the terminal output to locate any version of Jsonpath in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.0), your application is affected.
Note: The npm ls jsonpath 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 Jsonpath, 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-1615 Affected Jsonpath Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsonpath
|
npm |
< 1.3.0
|
1.3.0
|
References
Frequently Asked Questions
What is CVE-2026-1615?
Which Jsonpath versions are affected?
What version fixes CVE-2026-1615?
Is jsonpath affected?
What is the CVSS score of CVE-2026-1615?
What CWE is associated with CVE-2026-1615?
How can I check npm dependencies for CVE-2026-1615?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-87r5-mp6g-5w5j",
"modified" : "2026-03-19T16:17:26Z",
"published" : "2026-02-09T06:30:28Z",
"aliases" : [ "CVE-2026-1615" ],
"summary" : "jsonpath has Arbitrary Code Injection via Unsafe Evaluation of JSON Path Expressions",
"details" : "### Impact\n\n**Arbitrary Code Injection (Remote Code Execution & XSS):**\n\nA critical security vulnerability affects **all versions** of the `jsonpath` package. The library relies on the `static-eval` module to evaluate JSON Path expressions but fails to properly sanitize or sandbox the input.\n\nThis allows an attacker to inject arbitrary JavaScript code into the JSON Path expression. When the library evaluates this expression, the malicious code is executed.\n\n* **Node.js Environments:** This leads to **Remote Code Execution (RCE)**, allowing an attacker to compromise the server.\n* **Browser Environments:** This leads to **Cross-Site Scripting (XSS)**, allowing an attacker to hijack user sessions or exfiltrate data.\n\n**Affected Methods:**\n\nThe vulnerability triggers when untrusted data is passed to any method that evaluates a path, including:\n\n* `jsonpath.query`\n* `jsonpath.nodes`\n* `jsonpath.paths`\n* `jsonpath.value`\n* `jsonpath.parent`\n* `jsonpath.apply`\n\n### Patches\n\n**No Patch Available:**\n\nCurrently, **all versions** of `jsonpath` are vulnerable. There is no known patched version of this package that resolves the issue while retaining the current architecture.\n\n**Recommendation:**\n\nDevelopers are strongly advised to **migrate to a secure alternative** (such as `jsonpath-plus` or similar libraries that do not use `eval`/`static-eval`) or strictly validate all JSON Path inputs against a known allowlist.\n\n### Workarounds\n\n* **Strict Input Validation:** Ensure that no user-supplied data is ever passed directly to `jsonpath` functions.\n* **Sanitization:** If user input is unavoidable, implement a strict parser to reject any JSON Path expressions containing executable JavaScript syntax (e.g., parentheses `()`, script expressions `script:`, or function calls).\n\n### Resources\n\n* [CVE-2026-1615](https://nvd.nist.gov/vuln/detail/CVE-2026-1615)\n* [Vulnerable Code in handlers.js](https://github.com/dchester/jsonpath/blob/c1dd8ec74034fb0375233abb5fdbec51ac317b4b/lib/handlers.js#L243)\n* [Snyk Advisory (Java/WebJars)](https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-15141219)\n* [Snyk Advisory (JS)](https://security.snyk.io/vuln/SNYK-JS-JSONPATH-13645034)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsonpath"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-1615"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/pull/197"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/commit/491e2e01de2ff13f7d95e87eb2be726edbf4225f"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/commit/b61111f07ac1a8d0f3133b5fc51438ecb76a6c39"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dchester/jsonpath"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/blob/c1dd8ec74034fb0375233abb5fdbec51ac317b4b/lib/handlers.js#L243"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-15141219"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-JSONPATH-13645034"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-12T15:29:55Z",
"nvd_published_at" : "2026-02-09T05:16:24Z"
}
}