Vulnerability in Jonschlinkert Micromatch

CVE-2024-4067

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.

Vulnerability class: ReDoS (Regular Expression Denial of Service)

EPSS: 0.014 (70.3th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2024-4067?
CVE-2024-4067 is a medium-severity vulnerability in Jonschlinkert Micromatch, classified under Inefficient Regular Expression Complexity. CVSS score: 5.3/10. Published 2024-05-14.
How severe is CVE-2024-4067?
Medium severity. CVSS v3 base score is 5.3 out of 10.
Is CVE-2024-4067 known to be exploited?
1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.