CVE-2024-38985 depath and cool-path vulnerable to Prototype Pollution via `set()` Method
Attackers can execute arbitrary code or cause denial of service via prototype pollution in the set method of depath and cool-path libraries.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-38985?
CVE-2024-38985 is a critical code injection vulnerability in n/a, published on 28 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-1321
Which versions are affected by CVE-2024-38985?
4 open source packages ship an affected version, including cool-path and depath. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
cool-path npm | All versions to 1.1.2 | None |
cool-path npm | All versions to 1.1.2 | None |
depath npm | All versions to 1.0.6 | None |
depath npm | All versions to 1.0.6 | None |
Products include Janrywang Depath.
How do I fix CVE-2024-38985?
No fix has been published for CVE-2024-38985 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2024-38985 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38985 exists.
Sources
Also known as GHSA-4h4x-4m75-47j4.