All vulnerabilities

npm

CVE-2026-137196

Glob : `ignore` patterns lack the braceExpandMax limit applied to `pattern`

Severity
Medium
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
14.0.6
Exploit chance
0.8% in the next 30 daysHigher than 58% of CVEs. EPSS by FIRST, 1 Dec 2026
Weakness
Uncontrolled resource consumption (CWE-400)CWE-405Allocation without limits (CWE-770)
Also known as
GHSA-qxr8-q827-836c
Sources
OSV.dev and GitHub

Description

glob sets braceExpandMax: 10_000 when it parses pattern patterns, but the Ignore class builds its own minimatch options and omits braceExpandMax entirely, so ignore patterns fall back to minimatch's default of 100_000. Both paths force optimizationLevel: 2, which is the exact precondition for minimatch's globparts amplification (CVE-2026-118764, GHSA-g3hv-75wg-m249) — minimatch's own default is 1.

The consequence is that the same payload is rejected in milliseconds when passed as a pattern, but is accepted and burns far more CPU when passed as an ignore pattern.

src/glob.ts:527-529 — pattern path, limit present:

src/ignore.ts:71-83 — ignore path, limit missing:

minimatch >= 11.0.1 fixed CVE-2026-118764 by throwing a RangeError once globParts.length >= braceExpandMax. The pattern path caps rows at 10_000; the ignore path allows 100_000. The amplified rows then go through minimatch's secondPhasePreProcess(), which is O(n²) pairwise partsMatch.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
globnpm · osv:npm:glob
  • From 13.0.5 before 14.0.6

About glob

Weekly downloads (npm)
509,810,533npm, 1 Dec 2026

Vulnerabilities in glob

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
0
Known exploited
0
Search the list for glob

References