Vulnerabilities in pkg:npm/depath

PACKAGE
Advisory Identifier: GHSA-4h4x-4m75-47j4
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/depath

1 Known Advisory Record(s)

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

CVE Identifier CVE-2024-38985
GHSA Identifier GHSA-4h4x-4m75-47j4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Depath
Package Ecosystem npm
Published Date
Last Updated

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.

depath fixed: Latest secure release
npm install depath@Latest secure release
cool-path fixed: Latest secure release
npm install cool-path@Latest secure release
Verify Direct and Transitive Dependencies

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

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.

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?
CVE-2024-38985 is a security vulnerability in Depath involving depath and cool-path vulnerable to Prototype Pollution via `set()` Method under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Depath versions are affected?
Affected versions include releases prior to current release patches across affected packages: depath, cool-path.
What version fixes CVE-2024-38985?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is depath affected?
Yes, depath is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is cool-path affected?
Yes, cool-path is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-38985?
CVE-2024-38985 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for CVE-2024-38985?
Run the dependency tree command: 'npm ls depath'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}