cve.bz

CVE-2018-7158 nodejs node.js: Incorrect Regular Expression

7.5 highEPSS 3.5%

High (7.5) in nodejs node.js. EPSS 3.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
3.5% (unchanged from 3.5% a week ago; 3.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-185 Incorrect Regular Expression
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-7158 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-7158?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-7158?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-7158 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2018-7158

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2018-7158](https://cve.bz/cve/badge/CVE-2018-7158.svg)](https://cve.bz/cve/CVE-2018-7158)

HTML:

<a href="https://cve.bz/cve/CVE-2018-7158"><img src="https://cve.bz/cve/badge/CVE-2018-7158.svg" alt="CVE-2018-7158"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nodejs:node.jsfrom 4.0.0 through 4.1.2
nodejs:node.jsfrom 4.2.0 through 4.9.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14nodejs6.0.0~dfsg-1DEBIAN-CVE-2018-7158
UbuntuPro:14.04:LTS, Pro:16.04:LTSnodejsno fix listedUBUNTU-CVE-2018-7158
SUSEEnterprise Storage 4, Linux Enterprise Module for Web and Scripting 12nodejs44.9.1-15.11.1SUSE-SU-2018:0952-1
SUSEEnterprise Storage 4, Linux Enterprise Module for Web and Scripting 12, OpenStack Cloud 7nodejs66.14.1-11.12.1SUSE-SU-2018:1183-1
SUSELinux Enterprise Server 11 SP4-LTSSMozillaFirefox68.2.0-78.51.4SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSMozillaFirefox-branding-SLED68-21.9.8SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-atk2.26.1-2.8.4SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-cairo1.15.10-2.13.4SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-gdk-pixbuf2.36.11-2.8.4SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-glib22.54.3-2.14.7SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-gtk33.10.9-2.15.3SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-harfbuzz1.7.5-2.7.4SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-libffi3.2.1.git259-2.3.3SUSE-SU-2019:14246-1
SUSELinux Enterprise Server 11 SP4-LTSSfirefox-libffi-gcc55.3.1+r233831-14.1SUSE-SU-2019:14246-1
3 more for SUSE in the JSON and on SUSE's page.
Alpinev3.8, v3.9, v3.10 and 14 morenodejs8.11.0-r0ALPINE-CVE-2018-7158
Alpinev3.8, v3.9, v3.10 and 14 morenodejs-current9.10.0-r0ALPINE-CVE-2018-7158

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejsNot affected
Red Hat OpenShift Enterprise 3nodejsNot affected
Red Hat Software Collectionsrh-nodejs4-nodejsWill not fix
Red Hat Software Collectionsrh-nodejs6-nodejsNot affected
Red Hat Software Collectionsrh-nodejs8-nodejsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-7158.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON