CVE-2024-4067: Regular Expression Denial of Service in micromatch

Published May 13, 2024
·
Updated

Node.js micromatch module is vulnerable to a denial of service, caused by a regular expression denial of service (ReDoS) flaw in micromatch.braces() in index.js. By sending a specially crafted payload, a remote attacker could exploit this vulnerability to increase the consumption time until the application hangs or slows down.

Other sources

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.

https://devhub.checkmarx.com/cve-details/CVE-2024-4067/ https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a339747a/index.js#L448 https://github.com/micromatch/micromatch/issues/243 https://github.com/micromatch/micromatch/pull/247

Red Hat

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.

NVD

The NPM package micromatch prior to version 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 persisted prior to https://github.com/micromatch/micromatch/pull/266. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching.

GitHub

Affected Software

2 affected componentsFixes available
npm/micromatch<4.0.8
4.0.8
Jonschlinkert Micromatch Node.js<4.0.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/micromatch to a version that resolves this vulnerability.

    Fixed in 4.0.8

Event History

May 13, 2024
CVE Published
via MITRE·10:04 AM
Data Sourced
via MITRE·10:04 AM
DescriptionSeverityWeakness
May 14, 2024
Data Sourced
via NVD·03:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:42 PM
RemedyAffected Software
Advisory Published
via GitHub·06:30 PM
May 15, 2024
Data Sourced
via Red Hat·11:12 AM
DescriptionSeverityAffected Software
Jun 30, 2024
News Published
via BleepingComputer·02:31 PM
News Published
via BleepingComputer·02:32 PM
Feb 4, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-4067?

CVE-2024-4067 is classified as a denial of service vulnerability due to a regex ReDoS flaw in the micromatch module.

2

How do I fix CVE-2024-4067?

To fix CVE-2024-4067, upgrade the micromatch package to version 4.0.8 or later.

3

What software is affected by CVE-2024-4067?

CVE-2024-4067 affects the micromatch module and IBM Cognos Dashboards on Cloud Pak for Data versions up to 5.0.0.

4

Can CVE-2024-4067 be exploited remotely?

Yes, CVE-2024-4067 can be exploited remotely by sending specially crafted payloads to the affected application.

5

What is the impact of CVE-2024-4067?

The impact of CVE-2024-4067 includes potential service downtime and resource exhaustion due to increased consumption time.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203