CVE-2026-140008: minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0 `mergeRows`)

Published Nov 30, 2026
·
Updated

minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.0 until 11.0.7, mergeRows() in src/index.ts repeatedly copies and joins an entire pattern row while iterating each wildcard position, causing quadratic compilation time for long wildcard-only path patterns even when only one row exists. An attacker who can supply uncached patterns to new Minimatch or another compiling entry point can block the JavaScript event loop and cause a denial of service, with brace-generated rows further multiplying the work. This issue is fixed in version 11.0.7.

Affected Software

1 affected component
npm/minimatch>=11.0.0<11.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade minimatch to a version that resolves this vulnerability.

    Fixed in 11.0.7

Event History

Nov 30, 2026
CVE Published
via MITRE·09:36 PM
Data Sourced
via MITRE·09:36 PM
DescriptionWeakness
Data Sourced
via OSV·09:36 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed to this denial of service?

Applications are exposed when an attacker can supply long wildcard-only glob patterns that reach a new Minimatch instance or another pattern-compilation entry point. The impact is greater when supplied patterns are uncached, because compilation can block the JavaScript event loop.

2

What pattern characteristics make exploitation more expensive?

Long patterns containing wildcard positions trigger repeated copying and joining of the pattern row during compilation. Brace-generated rows can multiply the amount of work further.

3

What versions should be remediated?

The affected range is minimatch 11.0.0 through 11.0.7. Update to version 11.0.7, which contains the fix.

4

What can be done if an immediate update is not possible?

Restrict or validate untrusted glob patterns before they reach Minimatch compilation, particularly long wildcard-only patterns and patterns that generate rows through braces. Avoid repeatedly compiling attacker-controlled patterns without caching or request-level limits.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203