Vulnerability 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.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Jonschlinkert | Micromatch | < 4.0.8 |
Related Weaknesses (CWE)
References
- https://advisory.checkmarx.net/advisory/CVE-2024-4067/ExploitThird Party Advisory
- https://devhub.checkmarx.com/cve-details/CVE-2024-4067/Third Party Advisory
- https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0aePatch
- https://github.com/micromatch/micromatch/pull/266Issue TrackingPatch
- https://github.com/micromatch/micromatch/releases/tag/4.0.8Release Notes
- https://devhub.checkmarx.com/cve-details/CVE-2024-4067/Third Party Advisory
- https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a3Product
- https://github.com/micromatch/micromatch/issues/243Issue Tracking
- https://github.com/micromatch/micromatch/pull/247Issue TrackingPatch
FAQ
What is CVE-2024-4067?
CVE-2024-4067 is a vulnerability with a CVSS score of 5.3 (MEDIUM). 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...
How severe is CVE-2024-4067?
CVE-2024-4067 has been rated MEDIUM with a CVSS base score of 5.3/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2024-4067?
Check the references section above for vendor advisories and patch information. Affected products include: Jonschlinkert Micromatch.