CVE-2024-4067

Regular Expression Denial of Service in micromatch

MEDIUM
5.3
CVSS Score
Published: May 13, 2024 at 10:04 AM UTC
Updated: June 17, 2026 at 08:01 AM UTC
2 products affected across 2 vendorsMicromatchMicromatch

Using micromatch by micromatch?

Get instant alerts when new vulnerabilities affect micromatch - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 1%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.0.8
Affected range stops below 4.0.8, so it looks safe — our inference, not a vendor statement
v < 4.0.8
Vendor states this is fixed in 4.0.8 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (8)

ExploitThird Party Advisory
Source: 596c5446-0ce5-4ba2-aa66-48b3b757a647
https://advisory.checkmarx.net/advisory/CVE-2024-4067/
Third Party Advisory
Source: 596c5446-0ce5-4ba2-aa66-48b3b757a647
https://devhub.checkmarx.com/cve-details/CVE-2024-4067/
Issue TrackingPatch
Source: 596c5446-0ce5-4ba2-aa66-48b3b757a647
https://github.com/micromatch/micromatch/pull/266
Release Notes
Source: 596c5446-0ce5-4ba2-aa66-48b3b757a647
https://github.com/micromatch/micromatch/releases/tag/4.0.8
Issue Tracking
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/micromatch/micromatch/issues/243
Issue TrackingPatch
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/micromatch/micromatch/pull/247

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMCheckmarx
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
LOW
Vector?

Quick Info

StatusANALYZED
CWE
CWE-1333

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card