CVE-2025-61140: Jsonpath JSONPath Vulnerable To Prototype Pollution Vulnerability
MODERATECVE-2025-61140 is a MODERATE jsonpath vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Jsonpath libraries in the npm ecosystem. The issue involves jsonpath vulnerable to prototype pollution due to insufficient input validation of object keys in lib/index.js. Remediation is available by upgrading affected packages to version 1.2.0.
CVE-2025-61140 at a Glance
How to Fix CVE-2025-61140
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.2.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-2025-61140, 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.2.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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. 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-2025-61140 Affected Jsonpath Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsonpath
|
npm |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is CVE-2025-61140?
Which Jsonpath versions are affected?
What version fixes CVE-2025-61140?
Is jsonpath affected?
What CWE is associated with CVE-2025-61140?
How can I check npm dependencies for CVE-2025-61140?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6c59-mwgh-r2x6",
"modified" : "2026-02-05T16:14:30Z",
"published" : "2026-01-28T18:30:47Z",
"aliases" : [ "CVE-2025-61140" ],
"summary" : "JSONPath vulnerable to Prototype Pollution due to insufficient input validation of object keys in lib/index.js",
"details" : "The value function in jsonpath 1.1.1 lib/index.js is vulnerable to Prototype Pollution.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsonpath"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61140"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/issues/181"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/issues/194"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/pull/195"
}, {
"type" : "WEB",
"url" : "https://github.com/dchester/jsonpath/commit/9631412641b7095f86840a7a45b5b3afc68b0fcb"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/Dremig/8105c189774217222a8ebea3ed4d341d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dchester/jsonpath"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-02T14:09:06Z",
"nvd_published_at" : "2026-01-28T16:16:13Z"
}
}