Vulnerability GHSA-cf2h-pxjq-68xw

High Risk
HIGH RISK
CVSS Score: 8.0
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
17 hours ago
December 01, 2026 at 06:00 PM UTC
minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0 `mergeRows`)
11.0.0 - 11.0.6
11.0.0 - 11.0.6

Summary

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

Details

Summary. mergeRows() (src/index.ts ~813-852, introduced in 2e1d896) iterates every part position and, for each row with a wildcard there, copies and joins the whole row to build a Map key. For a pattern made of many wildcard-only path parts this is quadratic in the number of parts, even with a single row. It runs in new Minimatch, so any uncached pattern pays it.

Measured on 11.0.6 with a pattern of * parts joined by /: 1000 parts 22 ms, 2000 parts 72 ms, 4000 parts 190 ms, 8000 parts 805 ms (about 4× per doubling). Extrapolated to the 64 KB pattern limit (~32,000 parts), one compile blocks for roughly 13 s. A leading brace group of distinct words multiplies the rows and the cost.

Suggested fix. Build merge keys incrementally (or hash per position) instead of joining the full row at each position, or skip merging when there is only one row; and count the work against braceExpandMax or a new limit.

Related Vulnerabilities

Other vulnerabilities affecting the same packages

View all vulnerabilities for these packages

Impacted packages

Timeline

Published
17 hours ago
December 01, 2026 at 06:00 PM UTC
Fixed (11.0.7)
21 days ago
November 10, 2026 at 11:03 PM UTC
Last Modified
17 hours ago
December 01, 2026 at 06:15 PM UTC