What’s Vulnerable › Vulnerabilities
CVE-2018-7158
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2018-05-17 · updated 2026-10-08
- Weakness: CWE-185
Description
The `'path'` module in the Node.js 4.x release line contains a potential regular expression denial of service (ReDoS) vector. The code in question was replaced in Node.js 6.x and later so this vulnerability only impacts all versions of Node.js 4.x. The regular expression, `splitPathRe`, used within the `'path'` module for the various path parsing functions, including `path.dirname()`, `path.extname()` and `path.parse()` was structured in such a way as to allow an attacker to craft a string, that when passed through one of these functions, could take a significant amount of time to evaluate, potentially leading to a full denial of service.
Affected products
- Node.js: from 4.0.0 through 4.1.2; from 4.2.0 through 4.9.1
References
- https://nodejs.org/en/blog/vulnerability/march-2018-security-releases/
- https://nodejs.org/en/blog/vulnerability/march-2018-security-releases/
Get alerted when CVE-2018-7158 or the next vulnerability affects your stack