CVE-2024-4067

Regular Expression Denial of Service in micromatch

Published May 13, 2024 CVSS 3.1 · 5.3 Medium EPSS 1.4% KEV · Not listed
Description
The NPM package `micromatch` prior to 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in `micromatch.braces()` in `index.js` because the pattern `.*` will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-1540 The NPM package `micromatch` prior to 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in `micromatch.braces()` in `index.js` because the pattern `.*` will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.
Github GHSA Github GHSA GHSA-952p-6rrq-rcjv Regular Expression Denial of Service (ReDoS) in micromatch
History
Type Values Removed Values Added
First Time appeared Jonschlinkert
Jonschlinkert micromatch
CPEs cpe:2.3:a:jonschlinkert:micromatch:*:*:*:*:*:node.js:*:*
Vendors & Products Jonschlinkert
Jonschlinkert micromatch
Type Values Removed Values Added
Metrics epss

{'score': 0.00188}

epss

{'score': 0.00194}

Type Values Removed Values Added
First Time appeared Redhat satellite Utils
CPEs cpe:/a:redhat:satellite_utils:6.16::el8
cpe:/a:redhat:satellite_utils:6.16::el9
Vendors & Products Redhat satellite Utils
Type Values Removed Values Added
First Time appeared Redhat advanced Cluster Security
CPEs cpe:/a:redhat:advanced_cluster_security:4.6::el8
Vendors & Products Redhat advanced Cluster Security
Type Values Removed Values Added
First Time appeared Redhat satellite
Redhat satellite Capsule
CPEs cpe:/a:redhat:satellite:6.16::el8
cpe:/a:redhat:satellite:6.16::el9
cpe:/a:redhat:satellite_capsule:6.16::el8
cpe:/a:redhat:satellite_capsule:6.16::el9
Vendors & Products Redhat satellite
Redhat satellite Capsule
Type Values Removed Values Added
First Time appeared Micromatch
Micromatch micromatch
CPEs cpe:2.3:a:micromatch:micromatch:*:*:*:*:*:*:*:*
Vendors & Products Micromatch
Micromatch micromatch
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat
Redhat service Mesh
CPEs cpe:/a:redhat:service_mesh:2.6::el8
cpe:/a:redhat:service_mesh:2.6::el9
Vendors & Products Redhat
Redhat service Mesh
Type Values Removed Values Added
Description The NPM package `micromatch` is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in `micromatch.braces()` in `index.js` because the pattern `.*` will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching. The NPM package `micromatch` prior to 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in `micromatch.braces()` in `index.js` because the pattern `.*` will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Checkmarx
Published
Updated
Sep 17, 2024, 7:47 PM
Reserved
Apr 23, 2024, 1:31 PM
Status
Analyzed
Published
May 14, 2024, 3:42 PM
Modified
Jun 17, 2026, 8:01 AM
Severity
Moderate
Public date
Dec 12, 2023, 12:00 AM