CVE-2026-137196: Glob `ignore` Patterns Lack The BraceExpandMax Vulnerability
MODERATECVE-2026-137196 is a MODERATE `ignore` patterns lack the braceexpandmax vulnerability (CWE-405: Asymmetric Resource Consumption (Amplification)) affecting Glob libraries in the npm ecosystem. The issue involves `ignore` patterns lack the braceexpandmax limit applied to `pattern`. Remediation is available by upgrading affected packages to version 14.0.6.
CVE-2026-137196 at a Glance
How to Fix CVE-2026-137196
To remediate this vulnerability, upgrade all affected Glob dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install glob@14.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls glob
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-137196, inspect your project dependencies using npm:
npm ls glob
Analyze the terminal output to locate any version of Glob in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.0.6), your application is affected.
Note: The npm ls glob command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-405: Asymmetric Resource Consumption (Amplification), where the product does not properly control situations in which an adversary can cause the product to consume or produce excessive resources without requiring the adversary to invest equivalent work or otherwise prove authorization, i.e., the adversary's influence is "asymmetric.". In Glob, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-137196 Affected Glob Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
glob
|
npm |
≥ 13.0.5
< 14.0.6
|
14.0.6
|
References
Frequently Asked Questions
What is CVE-2026-137196?
Which Glob versions are affected?
What version fixes CVE-2026-137196?
Is glob affected?
What CWE is associated with CVE-2026-137196?
How can I check npm dependencies for CVE-2026-137196?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qxr8-q827-836c",
"modified" : "2026-12-01T01:39:39Z",
"published" : "2026-12-01T01:39:39Z",
"aliases" : [ "CVE-2026-137196" ],
"summary" : "Glob : `ignore` patterns lack the braceExpandMax limit applied to `pattern`",
"details" : "`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`.\n\nThe 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.\n\n### Root cause\n\n`src/glob.ts:527-529` — pattern path, limit present:\n\n```ts\nconst mmo: MinimatchOptions = {\n braceExpandMax: 10_000,\n ...opts,\n```\n\n`src/ignore.ts:71-83` — ignore path, limit missing:\n\n```ts\nthis.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n normalize,\n optimizationLevel: 2, // forced, and the amplification precondition\n platform,\n nocomment: true,\n nonegate: true,\n windowsPathsNoEscape,\n} // <-- no braceExpandMax\n```\n\nminimatch `>= 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`.\n\n### Reproduction\n\n```js\nimport { Volume, createFsFromVolume } from 'memfs'\nimport { glob } from 'glob'\n\nconst vol = new Volume()\nconst fs = createFsFromVolume(vol)\nvol.fromJSON({ '/p/f.txt': 'x' })\n\n// 14 '**/..' groups -> 2^14 = 16384 rows, over the 10_000 limit\nconst payload = Array.from({ length: 14 })\n .map((_, i) => `**/../x${i}/y${i}`)\n .join('/')\n\nglob.sync(payload, { cwd: '/p', fs, platform: 'posix' })\n// throws: optimizationLevel 2: too many patterns from '**/..' (rejected fast)\n\nglob.sync('*', { cwd: '/p', fs, ignore: [payload], platform: 'posix' })\n// accepted, ~1.5-2.0 s of CPU\n```\n\nMeasured on the published `glob@14.0.4`:\n\n```\npayload: 175 bytes\n as PATTERN : 6 ms REJECTED (optimizationLevel 2: too many patterns from '**/..)\n as IGNORE : 1985 ms accepted\n```\n\n### Impact\n\nAn attacker who can influence ignore patterns can force disproportionate CPU consumption on the event loop.\n\n## Fix\n\nIssue is in `src/ignore.ts`. A minimal change closes them:\n\n```diff\n this.mmopts = {\n+ braceExpandMax: 10_000,\n dot: true,\n nobrace,\n nocase,\n@@\n this.slashRoot = escape(\n slashRoot.replace(/\\\\/g, '/').replace(/\\/$/, ''),\n- { windowsPathsNoEscape },\n+ { magicalBraces: true, windowsPathsNoEscape },\n )\n```\n\n- `magicalBraces: true` makes `escape()` escape `{` and `}` as well, so the\n composed path stays literal and is not brace-expanded on re-parse.\n- `braceExpandMax: 10_000` makes the ignore path use the same limit as the\n pattern path.\n\nVerified: with this patch the ignore matcher becomes `[['', 'root{7,8}', 'skip.log']]` (one row, literal), matches `/root{7,8}/skip.log`, and the amplified ignore payload is rejected with the same error as the pattern path.\n\nRegression tests are in `test/ignore-braces.ts`; they fail against the unpatched source and pass with the patch. The existing suite (`test/ignore.ts`, `test/custom-ignore.ts`, `test/ignore-root.ts`, `test/pattern.ts`, `test/root.ts`, `test/absolute.ts`) remains green: 167/167.\n\nTested on published `glob@14.0.4` (current HEAD f26bdac). Earlier versions not checked.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "glob"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "13.0.5"
}, {
"fixed" : "14.0.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 14.0.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-glob/security/advisories/GHSA-qxr8-q827-836c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-137196"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-glob/commit/17cb20749bc65a64ec44d40de2736cc587564866"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/isaacs/node-glob"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-glob/releases/tag/v14.0.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-405", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T01:39:39Z",
"nvd_published_at" : "2026-11-30T21:17:25Z"
}
}