CVE-2026-27903: Minimatch Combinatorial Backtracking Vulnerability Leading to ReDoS
Summary
CVE-2026-27903: minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments. Affects minimatch across 8 version ranges.
< 3.1.3
>= 4.0.0, < 4.2.5
>= 5.0.0, < 5.1.8
>= 6.0.0, < 6.2.2
>= 7.0.0, < 7.4.8
>= 8.0.0, < 8.0.6
>= 9.0.0, < 9.0.7
>= 10.0.0, < 10.2.3
Fixed in 8 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- minimatch · ghsa
The same CVE-2026-27903 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Minimatch is a popular npm package used for matching file paths against glob patterns. It is widely utilized in various build tools and task runners, such as ESLint and Webpack, due to its efficiency in handling complex file matching scenarios. However, it is susceptible to a significant vulnerability that can lead to performance degradation under specific conditions.
Vulnerability Detail
The vulnerability in Minimatch arises from the matchOne() function, which performs unbounded recursive backtracking when a glob pattern contains multiple non-adjacent GLOBSTAR segments. This results in a combinatorial explosion of recursive calls, leading to excessive processing time for certain inputs. The time complexity can reach O(C(n, k)), where n is the number of path segments and k is the number of globstars. As a result, an attacker can craft patterns that stall the Node.js event loop for several seconds, effectively causing denial of service. This vulnerability affects any application that allows user-supplied glob patterns, making it a critical concern for developers.
How To Fix
Latest published version: 10.2.6 as of 22 Oct 2026
npm install minimatch@10.2.6
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 3.1.33.1.3npm install minimatch@3.1.3 -
>= 4.0.0, < 4.2.54.2.5npm install minimatch@4.2.5 -
>= 5.0.0, < 5.1.85.1.8npm install minimatch@5.1.8 -
>= 6.0.0, < 6.2.26.2.2npm install minimatch@6.2.2 -
>= 7.0.0, < 7.4.87.4.8npm install minimatch@7.4.8 -
>= 8.0.0, < 8.0.68.0.6npm install minimatch@8.0.6
Show all 8 release lines
-
>= 9.0.0, < 9.0.79.0.7npm install minimatch@9.0.7 -
>= 10.0.0, < 10.2.310.2.3npm install minimatch@10.2.3
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary measure, avoid using glob patterns with multiple non-adjacent GLOBSTAR segments. If possible, validate and sanitize user inputs to prevent the inclusion of malicious patterns that could exploit this vulnerability.
Conclusion
The Minimatch package contains a critical vulnerability (CVE-2026-27903) that can lead to denial of service through combinatorial backtracking. It is essential for developers to update to the latest patched version to protect their applications from potential exploitation.
See every vulnerability recorded for minimatch →
FAQ
The CVSS score of this vulnerability is 7.5, indicating a high severity level.
Versions of Minimatch from 0.0.0 to 10.2.2 are affected by this vulnerability.
You can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. You can also check if your application is affected by this vulnerability using the Vulert playground without any signup.
An attacker can exploit this vulnerability to stall the Node.js event loop, leading to denial of service for applications that rely on Minimatch for file path matching.
While updating is the best solution, you can mitigate risk by avoiding complex glob patterns with multiple GLOBSTAR segments and validating user inputs.
References
Related vulnerabilities
Recent vulnerabilities recorded for minimatch.