LiveActive security incident?Get immediate response
CVE Record

CVE-2018-7158: The `'path'` module in the Node.js 4.x release line contains a potential regular expression denial of servi...

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.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2018-7158 is a denial-of-service risk in Node.js 4.x. A specially crafted path string could make built-in path parsing functions spend excessive time processing it, potentially tying up the application. The provided sources say Node.js 6.x and later replaced the vulnerable code, so exposure is limited to Node.js 4.x.

Executive priority

Treat this as a targeted availability risk for legacy Node.js 4.x assets. It is not described as data theft or code execution, but affected internet-facing services could be disrupted if vulnerable parsing paths are reachable.

Technical view

The Node.js 4.x path module used a regular expression, splitPathRe, in path.dirname(), path.extname(), path.parse(), and related parsing paths. The regex could take significant time to evaluate for crafted input, creating a ReDoS condition. The source bundle states Node.js 6.x and later are not impacted because the code was replaced.

Likely exposure

Likely exposure is limited to services running Node.js 4.x that process attacker-controlled or externally supplied path-like strings through Node path parsing functions. The bundle identifies all Node.js 4.x versions as affected and does not identify other products.

Exploitation context

The source bundle does not show CISA KEV listing or cited evidence of active exploitation. Risk depends on whether an attacker can cause the application to pass crafted strings into the affected path functions and whether CPU exhaustion can disrupt service availability.

Researcher notes

Evidence is narrow and source-limited: affected product is Node.js 4.x, CWE-185, with no CVSS provided in the bundle. Do not broaden scope beyond Node.js 4.x. Validate exposure by mapping runtime version plus attacker-controlled input flow into the named path APIs.

Mitigation direction

  • Inventory runtime versions and identify any Node.js 4.x deployments.
  • Migrate affected services to Node.js 6.x or later per vendor guidance.
  • Review vendor security release guidance before selecting an update path.
  • Limit untrusted input reaching path parsing functions where upgrades are delayed.
  • Monitor affected services for CPU spikes tied to path-processing requests.

Validation and detection

  • Confirm production and build environments are not running Node.js 4.x.
  • Search application code for use of path.dirname, path.extname, and path.parse.
  • Identify whether those calls can receive external or user-controlled strings.
  • Check monitoring for unexplained event-loop blocking or CPU saturation.
  • Document any remaining Node.js 4.x systems and compensating controls.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-185: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2018-7158 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS and timeline data

No CVSS vectors or timeline events were available in the normalized CVE source material.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
The Node.js ProjectNode.js4.xListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-185 · source CWE mapping

Incorrect Regular Expression

Incorrect Regular Expression represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.