ghsa-952p-6rrq-rcjv
Vulnerability from github
Published
2024-05-14 18:30
Modified
2024-08-28 13:12
Severity ?
Summary
Regular Expression Denial of Service (ReDoS) in micromatch
Details
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.
{ "affected": [ { "package": { "ecosystem": "npm", "name": "micromatch" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "4.0.8" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2024-4067" ], "database_specific": { "cwe_ids": [ "CWE-1333" ], "github_reviewed": true, "github_reviewed_at": "2024-08-21T22:58:52Z", "nvd_published_at": "2024-05-14T15:42:47Z", "severity": "MODERATE" }, "details": "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\u0027t 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\u0027t start backtracking the regular expression due to greedy matching.\n", "id": "GHSA-952p-6rrq-rcjv", "modified": "2024-08-28T13:12:26Z", "published": "2024-05-14T18:30:54Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4067" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/issues/243" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/pull/247" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/pull/266" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/commit/500d5d6f42f0e8dfa1cb5464c6cb420b1b6aaaa0" }, { "type": "WEB", "url": "https://advisory.checkmarx.net/advisory/CVE-2024-4067" }, { "type": "WEB", "url": "https://devhub.checkmarx.com/cve-details/CVE-2024-4067" }, { "type": "PACKAGE", "url": "https://github.com/micromatch/micromatch" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a339747a/index.js#L448" }, { "type": "WEB", "url": "https://github.com/micromatch/micromatch/releases/tag/4.0.8" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "type": "CVSS_V3" } ], "summary": "Regular Expression Denial of Service (ReDoS) in micromatch" }
Loading...
Loading...
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.