nodejs: path module regular expression denial of service
Published May 17, 2018
7.5
HIGHCVSS 3.1
EPSS 3.41%
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
-
- Version 4.xStatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| The Node.js Project | Node.js | n/a |
|
No data.
Red Hat Enterprise Linux 8
nodejs
Not affected
Red Hat OpenShift Enterprise 3
nodejs
Not affected
Red Hat Software Collections
rh-nodejs4-nodejs
Will not fix
Red Hat Software Collections
rh-nodejs6-nodejs
Not affected
Red Hat Software Collections
rh-nodejs8-nodejs
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | nodejs | Not affected | n/a |
| Red Hat OpenShift Enterprise 3 | nodejs | Not affected | n/a |
| Red Hat Software Collections | rh-nodejs4-nodejs | Will not fix | n/a |
| Red Hat Software Collections | rh-nodejs6-nodejs | Not affected | n/a |
| Red Hat Software Collections | rh-nodejs8-nodejs | Not affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
AV:N/AC:L/Au:N/C:N/I:N/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (15 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 3.41% (0.03409) | 88.48th | v5 (v2026.06.15) |
| Jun 15, 2026 | 3.38% (0.03381) | 87.19th | v5 (v2026.06.15) |
| Mar 30, 2025 | 1.39% (0.01392) | 78.61th | v4 (v2025.03.14) |
| Mar 29, 2025 | 3.00% (0.03001) | 77.59th | v4 (v2025.03.14) |
| Jul 20, 2024 | 0.14% (0.00135) | 49.41th | v3 (v2023.03.01) |
| May 18, 2024 | 0.14% (0.00135) | 48.74th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.13% (0.00134) | 46.71th | v3 (v2023.03.01) |
| Mar 6, 2023 | 0.89% (0.00885) | 27.89th | v2 (v2022.01.01) |
| Sep 10, 2022 | 0.89% (0.00885) | 26.24th | v2 (v2022.01.01) |
| Apr 1, 2022 | 0.89% (0.00885) | 24.24th | v2 (v2022.01.01) |
| Feb 4, 2022 | 0.89% (0.00885) | 10.50th | v2 (v2022.01.01) |
| Feb 3, 2022 | 0.52% (0.00518) | 11.68th | v1 |
| Jan 6, 2022 | 0.52% (0.00518) | 11.22th | v1 |
| Sep 1, 2021 | 0.52% (0.00518) | 29.97th | v1 |
| Apr 14, 2021 | 0.52% (0.00518) | 0.00th | v1 |
References (5)
- https://access.redhat.com/security/cve/CVE-2018-7158 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1561980 Issue Tracking
- https://nodejs.org/en/blog/vulnerability/march-2018-security-releases/ x_refsource_CONFIRMVendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2018-7158
- https://www.cve.org/CVERecord?id=CVE-2018-7158
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2018-7158 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1561980 | Issue Tracking | |
| https://nodejs.org/en/blog/vulnerability/march-2018-security-releases/ | x_refsource_CONFIRMVendor Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2018-7158 | ||
| https://www.cve.org/CVERecord?id=CVE-2018-7158 |
Change history (0)
No recorded changes yet.