CVE-2026-27903: Minimatch Combinatorial Backtracking Vulnerability Leading to ReDoS

minimatch Updated 27 Feb 2026

Summary

26/02/2026
Yes i
High
7.5

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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.3 3.1.3
    npm install minimatch@3.1.3
  • >= 4.0.0, < 4.2.5 4.2.5
    npm install minimatch@4.2.5
  • >= 5.0.0, < 5.1.8 5.1.8
    npm install minimatch@5.1.8
  • >= 6.0.0, < 6.2.2 6.2.2
    npm install minimatch@6.2.2
  • >= 7.0.0, < 7.4.8 7.4.8
    npm install minimatch@7.4.8
  • >= 8.0.0, < 8.0.6 8.0.6
    npm install minimatch@8.0.6
Show all 8 release lines
  • >= 9.0.0, < 9.0.7 9.0.7
    npm install minimatch@9.0.7
  • >= 10.0.0, < 10.2.3 10.2.3
    npm 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for minimatch.

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.3 3.1.3
    npm install minimatch@3.1.3
  • >= 4.0.0, < 4.2.5 4.2.5
    npm install minimatch@4.2.5
  • >= 5.0.0, < 5.1.8 5.1.8
    npm install minimatch@5.1.8
  • >= 6.0.0, < 6.2.2 6.2.2
    npm install minimatch@6.2.2
  • >= 7.0.0, < 7.4.8 7.4.8
    npm install minimatch@7.4.8
  • >= 8.0.0, < 8.0.6 8.0.6
    npm install minimatch@8.0.6
Show all 8 release lines
  • >= 9.0.0, < 9.0.7 9.0.7
    npm install minimatch@9.0.7
  • >= 10.0.0, < 10.2.3 10.2.3
    npm 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback