minimatch Patches 3 High-Severity ReDoS Vulnerabilities

minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.

  • Sarah Gooding
3 min read
minimatch Patches 3 High-Severity ReDoS Vulnerabilities

On February 24, GitHub published two High severity security advisories for the widely used npm package minimatch. A third High severity advisory was published earlier on February 16.

All three vulnerabilities can lead to Regular Expression Denial of Service (ReDoS) and event loop starvation in Node.js when malicious glob patterns are processed.

Socket is releasing free certified patches for all three issues.

The advisories are:

The fixes were coordinated with minimatch maintainer Isaac Schlueter. Socket engineer Jordan Harband worked with Isaac to backport patches across affected major versions.

Ecosystem Impact

#

minimatch is a foundational dependency across the JavaScript ecosystem. It is used by build tools, CLIs, test runners, bundlers, and package managers to implement glob pattern matching.

The package receives approximately 472 million downloads per week on npm. Because it is frequently pulled in transitively, many projects may be exposed without directly depending on it.

Issues in widely reused utilities like minimatch can affect a large portion of the ecosystem.

CVE-2026-27904: Nested Extglob ReDoS

#

This vulnerability affects nested *() and +() extglobs. When nested, these patterns generate regular expressions with nested, unbounded quantifiers such as:

/^(?:(?:(?:a|b)*)*)*$/

These structures cause catastrophic backtracking in V8’s regex engine.

In testing against minimatch@10.2.2, a 12-byte pattern like:

*(*(*(a|b)))

combined with an 18-character non-matching input stalled execution for more than seven seconds. Increasing nesting depth or input size significantly increases runtime.

The issue is reachable through the default minimatch() API with no special configuration. Both *() and +() extglobs are affected. Passing { noext: true } disables extglob processing and mitigates the issue.

Patched versions:

  • 10.2.3
  • 9.0.7
  • 8.0.6
  • 7.4.8
  • 6.2.2
  • 5.1.8
  • 4.2.5
  • 3.1.4

CVSS 3.1: 7.5 (Availability impact)

CVE-2026-27903: GLOBSTAR Combinatorial Backtracking

#

A separate High severity vulnerability affects patterns containing multiple non-adjacent ** (GLOBSTAR) segments.

When evaluating these patterns, minimatch recursively attempts to match the remaining pattern against every possible suffix of the input path. With multiple globstars, the number of recursive calls grows combinatorially.

With 11 globstars and a 30-segment path, a single call can stall for approximately five seconds. With 13 globstars, execution exceeds 15 seconds.

Because Node.js runs on a single-threaded event loop, a single malicious pattern can block all concurrent work in the same process until evaluation completes.

Patched versions align with the same release lines listed above.

CVE-2026-26996: ReDoS via Repeated Wildcards

#

On February 16, minimatch published a High severity advisory addressing a related ReDoS issue triggered by patterns containing many consecutive * wildcards followed by a literal character not present in the input string.

Each * expands into a separate regex group. When the literal does not appear in the test string, the engine must explore an exponential number of possible splits before failing.

The time complexity grows at O(4^N), where N is the number of consecutive * characters. At 15 wildcards, a single call can take roughly two seconds. At higher counts, execution can effectively hang.

Patched versions:

  • 10.2.1
  • 9.0.6
  • 8.0.5
  • 7.4.7
  • 6.2.1
  • 5.1.7
  • 4.2.4
  • 3.1.3

Impact and Risk Surface

#

All three vulnerabilities require the attacker to influence the glob pattern passed to minimatch().

Potential exposure includes:

  • Build tools that accept user-supplied glob arguments
  • Multi-tenant systems where users configure glob-based rules
  • CI/CD pipelines evaluating user-submitted configuration files
  • Admin interfaces that accept ignore rules or file filters

In these contexts, a crafted pattern can stall the Node.js event loop for seconds or longer per invocation.

Socket Certified Patches Available

#

Socket has published Certified Patches for these vulnerabilities. These patches can be applied to affected versions of minimatch without requiring a full dependency upgrade.

Certified Patches apply a targeted fix directly to the vulnerable code while preserving the rest of the package’s behavior.

You can install and apply the patches using:

socket patch add GHSA-23c5-xmqv-rm74

socket patch add GHSA-7r86-cg39-jmmj

socket patch add GHSA-3ppc-4f35-3m26

After installing dependencies, make sure patches are applied as part of your build process.

Individual Certified Patches for each High severity vulnerability are free to use and available to anyone, including teams that are not Socket customers.

Combined patched builds that include multiple fixes are available through Socket’s Certified Patches program.

Learn more about how Certified Patches work:
https://socket.dev/blog/certified-patches

Stay ahead of threats

Subscribe to our newsletter

Get notified when we publish new security blog posts!