CVE-2018-7158
Reported by nodejs · Published May 17, 2018
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| nodejs-current | Alpine | 9.10.0-r0 |
| nodejs | Alpine | 8.11.0-r0 |
| node | DHI | 4.9.0 |
| alpine/nodejs-22 | alpine | 4.9.0 |
| alpine/nodejs-24 | alpine | 4.9.0 |
| alpine/nodejs-20 | alpine | 4.9.0 |
| alpine/nodejs-25 | alpine | 4.9.0 |
| node.js | nodejs | 4.9.1, 4.1.2 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| The Node.js Project | Node.js | 4.x |
| alpine | nodejs-current | 0 |
| alpine | nodejs | 0 |
| The Node.js Project | Node.js | 4.x |
Timeline
- Apr 16, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Jun 1, 2026 Security Advisory
- Jun 17, 2026 CVE Updated
- Sep 19, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-7158
vulnetix vdb fixes CVE-2018-7158
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-7158/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart