{"id":"CVE-2024-4067","published":"2024-05-13T10:04:42Z","modified":"2024-09-17T19:47:41Z","title":"Regular Expression Denial of Service in micromatch","vendor":"micromatch","product":"micromatch","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01429,"percentile":0.73651,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://devhub.checkmarx.com/cve-details/CVE-2024-4067/","tags":[]},{"url":"https://github.com/micromatch/micromatch/pull/266","tags":[]},{"url":"https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade","tags":[]},{"url":"https://github.com/micromatch/micromatch/releases/tag/4.0.8","tags":[]},{"url":"https://advisory.checkmarx.net/advisory/CVE-2024-4067/","tags":[]},{"url":"https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a339747a/index.js#L448","tags":["x_transferred"]},{"url":"https://github.com/micromatch/micromatch/issues/243","tags":["x_transferred"]},{"url":"https://github.com/micromatch/micromatch/pull/247","tags":["x_transferred"]}],"priority":{"score":18.4,"factors":[{"name":"EPSS percentile","points":14.73},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"micromatch","affectedVersions":[{"vendor":"micromatch","product":"micromatch","versions":["< 4.0.8"]}],"fixedVersions":[{"vendor":"micromatch","product":"micromatch","versions":["4.0.8"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2024-05-13T16:30:13.286431Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"micromatch","vulnerableRanges":["<4.0.8"],"patched":["4.0.8"],"from":["GHSA-952p-6rrq-rcjv"],"provenance":"source"}],"summary":{"text":"The micromatch NPM package, prior to version 4.0.8, contains a Regular Expression Denial of Service flaw in the braces() function in index.js, where a greedy .* pattern causes catastrophic backtracking on crafted input. An unauthenticated attacker with network access can send a malicious payload to an application using this function, without any user interaction or special configuration, to make it hang or slow down as processing time grows with input size.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:36:07Z"},"euvd":{"id":"EUVD-2024-1540","exploited":false,"provenance":"source"}}