CVE-2018-7158 Denial of service in Node.js
Attackers can cause denial of service in Node.js 4.x by crafting inputs that trigger excessive CPU usage in path parsing functions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-7158?
CVE-2018-7158 is a high-severity denial of service vulnerability in Nodejs Node.js, published on 17 May 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-185
Which versions are affected by CVE-2018-7158?
It affects 1 product.
Products include Nodejs Node.js.
How do I fix CVE-2018-7158?
Upgrade to a fixed version.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2018-7158 being exploited?
There is no known exploitation of CVE-2018-7158 in the wild and no public exploit code.
Other vulnerabilities in Nodejs Node.js
Sources
Also known as ALPINE-CVE-2018-7158, CLEANSTART-2026-DV63680, CLEANSTART-2026-KN13673, DEBIAN-CVE-2018-7158, GHSA-43w8-q5fx-vj5w, UBUNTU-CVE-2018-7158.