CVE-2026-137196: CVE-2026-137196: Synchronous Event-Loop Denial of Service via Unbounded Ignore Pattern Expansion in node-glob
CVE-2026-137196: Synchronous Event-Loop Denial of Service via Unbounded Ignore Pattern Expansion in node-glob Vulnerability ID: CVE-2026-137196 CVSS Score: 6.3 Published: 2026-12-01 CVE-2026-137196 (also tracked as
CVE-2026-137196: Synchronous Event-Loop Denial of Service via Unbounded Ignore Pattern Expansion in node-glob
Vulnerability ID: CVE-2026-137196
CVSS Score: 6.3
Published: 2026-12-01
CVE-2026-137196 (also tracked as GHSA-qxr8-q827-836c) is an asymmetric resource consumption and denial-of-service vulnerability affecting the npm package glob (node-glob) in versions 13.0.5 through 14.0.5. When processing primary search patterns, node-glob relies on the minimatch engine with a default safeguard parameter (braceExpandMax: 10_000) to prevent combinatorial explosions during shell brace and directory traversal expansion. However, the Ignore class in src/ignore.ts instantiated its internal minimatch options with optimizationLevel: 2 while omitting the braceExpandMax configuration property. Consequently, applications that pass untrusted input into the ignore option allow attackers to trigger unbounded pattern expansion and quadratic O(n^2) preprocessing loops inside secondPhasePreProcess(), leading to single-threaded Node.js event-loop starvation.
TL;DR
Versions 13.0.5 through 14.0.5 of node-glob fail to propagate the braceExpandMax limit (default 10,000) to the Ignore class when compiling ignore patterns via minimatch. Remote attackers who control ignore pattern inputs can submit compact strings containing nested brace groups or repeated '**/..' sequences, causing exponential expansion and quadratic preprocessing overhead that blocks the Node.js event loop.
⚠️ Exploit Status: POC
Technical Details
- CVE / Advisory ID: CVE-2026-137196 / GHSA-qxr8-q827-836c
- Vulnerability Class: CWE-405: Asymmetric Resource Consumption (Amplification) / CWE-400
- Affected Component: isaacs/node-glob (npm: glob) Ignore class in src/ignore.ts (>= 13.0.5, < 14.0.6)
- CVSS v4.0 Score: 6.3 Medium (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)
- Attack Vector: Network / Untrusted input passed to the glob 'ignore' option
- Security Impact: Synchronous Node.js event-loop starvation and Denial of Service via O(n^2) pattern preprocessing
- Exploit Maturity: Proof of Concept (PoC) publicly available in official regression suite
- Fixed Version: glob v14.0.6
Affected Systems
- isaacs/node-glob (npm package: glob) >= 13.0.5, < 14.0.6
-
glob (node-glob): >= 13.0.5, < 14.0.6 (Fixed in:
14.0.6)
Code Analysis
Commit: 17cb207
Enforce braceExpandMax (default 10_000) in Ignore constructor and escape magical braces in slashRoot.
--- a/src/ignore.ts
+++ b/src/ignore.ts
@@ -58,6 +58,7 @@ export class Ignore implements IgnoreLike {
root,
windowsPathsNoEscape,
allowWindowsEscape,
+ braceExpandMax = 10_000,
}: GlobWalkerOpts,
cwd?: Path,
) {
@@ -69,6 +70,7 @@ export class Ignore implements IgnoreLike {
windowsPathsNoEscape =
!!windowsPathsNoEscape || allowWindowsEscape === false
this.mmopts = {
+ braceExpandMax,
dot: true,
nobrace,
nocase,
@@ -84,7 +86,7 @@ export class Ignore implements IgnoreLike {
const slashRoot = cwd?.resolve(root ?? '/').fullpath() ?? '/'
this.slashRoot = escape(
slashRoot.replace(/\\/g, '/').replace(/\/$/, ''),
- { windowsPathsNoEscape },
+ { magicalBraces: true, windowsPathsNoEscape },
)
for (const ign of ignored) this.add(ign)
}
Commit: 908e616
Release v14.0.6 containing the fix for CVE-2026-137196 / GHSA-qxr8-q827-836c.
Exploit Details
- GitHub: Official fix commit containing regression unit tests demonstrating 2^14 '**/..' traversal amplification and brace expansion payloads against the Ignore class.
Mitigation Strategies
- Upgrade node-glob (npm package 'glob') to version 14.0.6 or later to enforce braceExpandMax: 10_000 on ignore patterns.
- Enable 'nobrace: true' in GlobOptions when evaluating untrusted patterns that do not require shell brace expansion.
- Sanitize and restrict user-controlled ignore patterns by stripping brace characters ('{', '}') and blocking repeated '**/..' traversal sequences.
- Wrap glob and Ignore invocations in try/catch blocks to gracefully handle RangeError exceptions when patterns exceed braceExpandMax.
- Isolate untrusted file-matching workloads inside worker_threads with strict execution timeouts to protect the main Node.js event loop.
Remediation Steps:
- Audit project dependencies using 'npm ls glob' or 'pnpm why glob' to identify instances of glob >= 13.0.5 and < 14.0.6.
- Run 'npm install glob@^14.0.6' (or equivalent package manager command) to install the patched release.
- Configure package.json 'overrides' or 'resolutions' if transitive dependencies lock glob to a vulnerable 13.x or 14.0.x version.
- Review application call sites where user input populates the 'ignore' option and ensure RangeError exceptions are caught and handled.
References
- GitHub Security Advisory GHSA-qxr8-q827-836c (isaacs/node-glob)
- GitHub Advisory Database: GHSA-qxr8-q827-836c
- Patch Commit 17cb20749bc65a64ec44d40de2736cc587564866
- Release Commit 908e6169a79870d8694124f197f5aa052c6cfe2a (v14.0.6)
- node-glob v14.0.6 Release Notes
- National Vulnerability Database (NVD) - CVE-2026-137196
- CVE.org Record: CVE-2026-137196
- OSV.dev Vulnerability Entry: GHSA-qxr8-q827-836c
- CVEListV5 Official JSON Record for CVE-2026-137196
Read the full report for CVE-2026-137196 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.