Skip to main content
VulnerabilityPublished

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

Affects minimatchSource GCVE Database

0
Compare
Authoritative record:CVE-2026-140008· High 8.7

Not known to be exploited · CVSS 8.7 High : upgrade to 11.0.7 soon.

Data as of 1 Dec 2026, 19:00 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 4.08.7
Patch
Available – fixed in 11.0.7
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Dec 2026.

What to do

Upgrade minimatch to 11.0.7.

Affected software

ProductAffectedFixed in
npmminimatchAffected
  • >=11.0.0 <11.0.7
Fixed in
  • 11.0.7

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

**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.

References

Community reviews

Loading reviews…