{"id":"CVE-2026-26996","aliases":["CVE-2026-26996","GHSA-3ppc-4f35-3m26"],"related":[],"kind":"vulnerability","state":"published","title":"minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern","summary":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. Versions 10.2.0 and below are vulnerable to Regular Expression Denial of Service (ReDoS) when a glob pattern contains many consecutive * wildcards followed by a literal character that doesn't appear in the test string. Each * compiles to a separate [^/]*? regex group, and when the match fails, V8's regex engine backtracks exponentially across all possible splits. The time complexity is O(4^N) where N is the number of * characters. With N=15, a single minimatch() call takes ~2 seconds. With N=34, it hangs effectively forever. Any application that passes user-controlled strings to minimatch() as the pattern argument is vulnerable to DoS. This issue has been fixed in version 10.2.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. Versions 10.2.0 and below are vulnerable to Regular Expression Denial of Service (ReDoS) when a glob pattern contains many consecutive * wildcards followed by a literal character that doesn't appear in the test string. Each * compiles to a separate [^/]*? regex group, and when the match fails, V8's regex engine backtracks exponentially across all possible splits. The time complexity is O(4^N) where N is the number of * characters. With N=15, a single minimatch() call takes ~2 seconds. With N=34, it hangs effectively forever. Any application that passes user-controlled strings to minimatch() as the pattern argument is vulnerable to DoS. This issue has been fixed in version 10.2.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n`minimatch` is vulnerable to Regular Expression Denial of Service (ReDoS) when a glob pattern contains many consecutive `*` wildcards followed by a literal character that doesn't appear in the test string. Each `*` compiles to a separate `[^/]*?` regex group, and when the match fails, V8's regex engine backtracks exponentially across all possible splits.\n\nThe time complexity is O(4^N) where N is the number of `*` characters. With N=15, a single `minimatch()` call takes ~2 seconds. With N=34, it hangs effectively forever.\n\n\n### Details\n_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._\n\n### PoC\nWhen minimatch compiles a glob pattern, each `*` becomes `[^/]*?` in the generated regex. For a pattern like `***************X***`:\n\n```\n/^(?!\\.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?X[^/]*?[^/]*?[^/]*?$/\n```\n\nWhen the test string doesn't contain `X`, the regex engine must try every possible way to distribute the characters across all the `[^/]*?` groups before concluding no match exists. With N groups and M characters, this is O(C(N+M, N)) — exponential.\n### Impact\nAny application that passes user-controlled strings to `minimatch()` as the pattern argument is vulnerable to DoS. This includes:\n- File search/filter UIs that accept glob patterns\n- `.gitignore`-style filtering with user-defined rules\n- Build tools that accept glob configuration\n- Any API that exposes glob matching to untrusted input\n\n----\n\nThanks to @ljharb for back-porting the fix to legacy versions of minimatch.","format":"markdown","source":"ghsa"},{"lang":"es","text":"minimatch es una utilidad de coincidencia mínima para convertir expresiones glob en objetos RegExp de JavaScript. Las versiones 10.2.0 e inferiores son vulnerables a la denegación de servicio por expresión regular (ReDoS) cuando un patrón glob contiene muchos comodines * consecutivos seguidos de un carácter literal que no aparece en la cadena de prueba. Cada * se compila en un grupo de regex [^/]*? separado, y cuando la coincidencia falla, el motor de regex de V8 retrocede exponencialmente a través de todas las posibles divisiones. La complejidad temporal es O(4^N) donde N es el número de caracteres *. Con N=15, una sola llamada a minimatch() tarda ~2 segundos. Con N=34, se cuelga efectivamente para siempre. Cualquier aplicación que pase cadenas controladas por el usuario a minimatch() como argumento de patrón es vulnerable a DoS. Este problema ha sido solucionado en la versión 10.2.1.","source":"nvd"}],"published":"2026-02-18T22:38:11.000Z","modified":"2026-09-10T03:50:33.812Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"< 10.2.1","status":"affected"}],"vendor":"isaacs","product":"minimatch","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"10.0.0","status":"affected","fixed":"10.2.1"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"9.0.0","status":"affected","fixed":"9.0.6"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.0.0","status":"affected","fixed":"8.0.5"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.4.7"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"6.0.0","status":"affected","fixed":"6.2.1"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.1.7"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.2.4"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.3"}],"ecosystem":"npm","package":"minimatch","purl":"pkg:npm/minimatch","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.1.3"},{"status":"affected","introduced":"4.0.0","fixed":"4.2.4"},{"status":"affected","introduced":"5.0.0","fixed":"5.1.7"},{"status":"affected","introduced":"6.0.0","fixed":"6.2.1"},{"status":"affected","introduced":"7.0.0","fixed":"7.4.7"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.5"},{"status":"affected","introduced":"9.0.0","fixed":"9.0.6"},{"status":"affected","introduced":"10.0.0","fixed":"10.2.1"}],"vendor":"minimatch_project","product":"minimatch","cpe":"cpe:2.3:a:minimatch_project:minimatch:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/isaacs/minimatch/security/advisories/GHSA-3ppc-4f35-3m26","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/isaacs/minimatch/commit/2e111f3a79abc00fa73110195de2c0f2351904f5","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26996","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/isaacs/minimatch","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-02-20T15:31:36.544Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-26996","url":"https://www.cve.org/CVERecord?id=CVE-2026-26996","licence":"CVE Terms of Use","modified":"2026-02-20T15:34:15.151Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3ppc-4f35-3m26","url":"https://github.com/advisories/GHSA-3ppc-4f35-3m26","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.812Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-26996","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26996","licence":"Public domain","modified":"2026-06-17T10:26:30.527Z"}],"updatedAt":"2026-11-25T22:59:14.324Z","epss":{"score":0.00569,"percentile":0.48476,"date":"2026-12-01T12:00:22.000Z"}}