Vulnerabilities in pkg:npm/depath
PACKAGECVE-2024-38985 is a HIGH depath and cool-path vulnerable to vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Depath libraries in the npm ecosystem. The issue involves depath and cool-path vulnerable to prototype pollution via `set()` method. Remediation is available in the latest vendor maintenance releases.
pkg:npm/depath
Vulnerability advisories affecting package pkg:npm/depath. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4h4x-4m75-47j4 | CVE-2024-38985 | HIGH | depath and cool-path vulnerable to Prototype Pollution via `set()` Method |
CVE-2024-38985 at a Glance
How to Fix CVE-2024-38985
To remediate this vulnerability, upgrade all affected Depath 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 depath@Latest secure release
npm install cool-path@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls depath
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-38985, inspect your project dependencies using npm:
npm ls depath
Analyze the terminal output to locate any version of Depath in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls depath 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 Depath, 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-2024-38985 Affected Depath Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
depath
|
npm |
≤ 1.0.6
|
|
|
cool-path
|
npm |
≤ 1.1.2
|
|
References
Frequently Asked Questions
What is CVE-2024-38985?
Which Depath versions are affected?
What version fixes CVE-2024-38985?
Is depath affected?
Is cool-path affected?
What CWE is associated with CVE-2024-38985?
How can I check npm dependencies for CVE-2024-38985?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4h4x-4m75-47j4",
"modified" : "2025-03-31T15:56:47Z",
"published" : "2025-03-28T21:30:46Z",
"aliases" : [ "CVE-2024-38985" ],
"summary" : "depath and cool-path vulnerable to Prototype Pollution via `set()` Method",
"details" : "janryWang products depath v1.0.6 and cool-path v1.1.2 were discovered to contain a prototype pollution via the set() method at setIn (lib/index.js:90). This vulnerability allows attackers to execute arbitrary code or cause a Denial of Service (DoS) via injecting arbitrary properties.",
"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:L/SI:L/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "depath"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.0.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "cool-path"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-38985"
}, {
"type" : "WEB",
"url" : "https://github.com/janryWang/depath/issues/11"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/mestrtee/32c0a48023036e51918f6a098f21953d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/janryWang/depath"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-31T15:56:47Z",
"nvd_published_at" : "2025-03-28T21:15:16Z"
}
}