Dec 1, 2026·10 min read·6 visits
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.
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.
The glob library (isaacs/node-glob) is a foundational file-matching utility in the Node.js ecosystem. It translates shell-style wildcard patterns, recursive directory indicators (**), and brace expressions ({a,b,c}) into filesystem traversal operations. Because it sits at the core of build tools, command-line utilities, static analysis scanners, and backend web services, its pattern compilation engine constitutes a primary attack surface whenever applications allow users or external configuration files to define search or exclusion filters.
To prevent resource exhaustion during pattern compilation, node-glob delegates pattern parsing to minimatch and enforces an upper threshold on brace expansion via the braceExpandMax parameter, which defaults to 10_000. If a primary search expression expands into more than 10,000 combinations, the engine halts compilation and throws a RangeError. This threshold bounds both memory allocation and downstream processing complexity.
In node-glob versions 13.0.5 through 14.0.5, this defensive boundary was omitted from the Ignore class defined in src/ignore.ts. While primary glob patterns enforced braceExpandMax, exclusion rules supplied via the ignore configuration property were compiled with optimizationLevel: 2 and no upper bound on expansion size.
Classified under CWE-400 (Uncontrolled Resource Consumption), CWE-405 (Asymmetric Resource Consumption), and CWE-770 (Allocation of Resources Without Limits or Throttling), this omission exposes affected services to synchronous Denial of Service (DoS). If an application passes untrusted input into the ignore parameter, a short payload of fewer than 100 characters can expand into tens of thousands of pattern segments, triggering quadratic $O(n^2)$ preprocessing work that monopolizes the single-threaded Node.js event loop.
The root cause of CVE-2026-137196 lies in the inconsistent propagation of minimatch options between the primary Glob walker and the Ignore filter handler. When glob(pattern, options) is invoked, the library initializes an Ignore instance to evaluate paths that should be skipped during filesystem traversal. The Ignore constructor accepts a GlobWalkerOpts configuration object and constructs an internal options dictionary (this.mmopts) passed to minimatch.
Prior to version 14.0.6, the GlobWalkerOpts TypeScript interface in src/walker.ts did not declare braceExpandMax, and the Ignore constructor in src/ignore.ts did not destructure or forward it into this.mmopts. At the same time, the Ignore constructor explicitly set optimizationLevel: 2 inside this.mmopts to enable aggressive pattern normalization and deduplication in minimatch.
Setting optimizationLevel: 2 activates secondPhasePreProcess() inside minimatch during pattern compilation. Under this optimization level, two distinct amplification vectors emerge when braceExpandMax is absent. First, multiplicative brace groups ({a,b,c,d,e} repeated $n$ times) expand at a rate of $k^n$ into thousands of distinct string patterns. Second, sequences containing recursive wildcards followed by parent-directory segments (**/..) undergo combinatorial splitting during level-2 optimization, where $n$ occurrences of **/.. yield $2^n$ expanded globparts rows.
Once these thousands of globparts are generated in memory, secondPhasePreProcess() executes a nested comparison routine across the expanded parts to coalesce redundant traversal directives. This algorithm scales quadratically ($O(n^2)$) relative to the number of expanded parts. Because pattern compilation executes synchronously on the main V8 thread, the quadratic loop prevents the Node.js event loop from advancing to the poll or check phases, starving all concurrent I/O callbacks and network connections.
In addition to the unbounded expansion defect, analysis of the Ignore constructor revealed a secondary parsing flaw regarding path root resolution. When constructing this.slashRoot from root ?? '/', the code passed the resolved filesystem path through minimatch's escape() function without setting { magicalBraces: true }. If the working directory or configured root path on the host filesystem contained literal brace characters (such as /var/data/build{1,2}/), those literal directory names were erroneously interpreted as expandable brace expressions whenever absolute ignore rules were processed.
The vulnerability was introduced across the 13.0.5 and 14.x release branches and remediated in commit 17cb20749bc65a64ec44d40de2736cc587564866 (released as version 14.0.6). In the vulnerable implementation of src/ignore.ts, the Ignore class constructor extracted operational parameters from GlobWalkerOpts but excluded braceExpandMax.
// Vulnerable code in src/ignore.ts (versions 13.0.5 to 14.0.5)
export class Ignore implements IgnoreLike {
// ...
constructor(
ignored: string[],
{
nobrace,
nocase,
noext,
noglobstar,
platform = defaultPlatform,
root,
windowsPathsNoEscape,
allowWindowsEscape,
// VULNERABILITY: braceExpandMax is not extracted from GlobWalkerOpts
}: GlobWalkerOpts,
cwd?: Path,
) {
// ...
windowsPathsNoEscape =
!!windowsPathsNoEscape || allowWindowsEscape === false
this.mmopts = {
// VULNERABILITY: braceExpandMax is absent; minimatch imposes no expansion cap
dot: true,
nobrace,
nocase,
nocomment: true,
noext: true,
nonegate: true,
optimizationLevel: 2,
platform,
}
const slashRoot = cwd?.resolve(root ?? '/').fullpath() ?? '/'
this.slashRoot = escape(
slashRoot.replace(/\\/g, '/').replace(/\/$/, ''),
// SECONDARY FLAW: literal braces in root path are not escaped
{ windowsPathsNoEscape },
)
for (const ign of ignored) this.add(ign)
}
}The official patch updates src/walker.ts to expose braceExpandMax?: number on the GlobWalkerOpts interface and modifies src/ignore.ts to enforce a default limit of 10_000 while escaping 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, // Enforce 10,000 default expansion ceiling
}: GlobWalkerOpts,
cwd?: Path,
) {
@@ -69,6 +70,7 @@ export class Ignore implements IgnoreLike {
windowsPathsNoEscape =
!!windowsPathsNoEscape || allowWindowsEscape === false
this.mmopts = {
+ braceExpandMax, // Propagate limit to minimatch options
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 }, // Escape literal braces in root paths
)
for (const ign of ignored) this.add(ign)
}--- a/src/walker.ts
+++ b/src/walker.ts
@@ -23,6 +23,7 @@ const { ABSOLUTE, IF_DIR } = MatchRecord
export interface GlobWalkerOpts {
absolute?: boolean
allowWindowsEscape?: boolean
+ braceExpandMax?: number
cwd?: string | URL
dot?: boolean
dotRelative?: boolean> [!NOTE]
> Assessment of Fix Completeness: The fix in commit 17cb20749bc65a64ec44d40de2736cc587564866 completely aligns the Ignore class with the primary Glob pattern parser. When an ignore expression exceeds 10,000 combinations (either via explicit brace groups or optimizationLevel: 2 traversal expansion), minimatch throws a RangeError during the initial expansion phase before entering the quadratic loop in secondPhasePreProcess(). Furthermore, callers who require custom thresholds can override braceExpandMax via GlobOptions, and that custom value is now uniformly respected across both positive match patterns and ignore filters.
Exploiting CVE-2026-137196 requires an application to pass attacker-controlled strings into the ignore option of glob(), globSync(), globStream(), or direct instantiations of the Ignore class. No elevated privileges or authentication are necessary if the application exposes an API endpoint, configuration parser, or query parameter that accepts exclusion filters (indicated by AT:P and PR:N in the CVSS v4.0 vector).
Two distinct payload structures trigger the resource amplification. The first method leverages directory traversal amplification under optimizationLevel: 2. Each occurrence of **/.. inside an ignore string doubles the number of generated globparts rows ($2^n$ growth). A chain of 14 **/.. segments expands into $2^{14} = 16,384$ parts, exceeding the intended 10,000 ceiling and forcing secondPhasePreProcess() to execute roughly $2.68 \times 10^8$ comparisons.
import { globSync, Ignore } from 'glob';
// PoC 1: Directory Traversal Amplification (2^14 = 16,384 glob parts)
// Payload length is only 153 characters
const traversalPayload = Array.from({ length: 14 })
.map((_, i) => `**/../x${i}/y${i}`)
.join('/');
// In glob >= 13.0.5 and < 14.0.6, this blocks the event loop synchronously
// In glob >= 14.0.6, this immediately throws a RangeError
new Ignore([traversalPayload], { platform: 'linux' });
// Equivalent trigger via standard globSync API:
globSync('**/*', {
cwd: '/tmp',
ignore: [traversalPayload],
});The second method uses standard multiplicative brace expansion ($k^n$ growth). By repeating a 5-element brace group {a,b,c,d,e} six times, a 60-character string generates $5^6 = 15,625$ expanded patterns.
import { Ignore } from 'glob';
// PoC 2: Combinatorial Brace Expansion (5^6 = 15,625 combinations)
const bracePayload = '{a,b,c,d,e}'.repeat(6);
// Triggers unchecked expansion and high CPU consumption in vulnerable versions
const ign = new Ignore([bracePayload], { platform: 'linux' });If an attacker increases the payload slightly—for example, repeating {a,b,c,d,e} eight times ($5^8 = 390,625$ combinations) or chaining 18 **/.. segments ($2^{18} = 262,144$ combinations)—the synchronous preprocessing loop locks the V8 thread for minutes or exhausts the V8 heap limit, terminating the Node.js worker process with an Out-Of-Memory (OOM) crash.
The primary impact of CVE-2026-137196 is Denial of Service (DoS) against the host Node.js runtime through CPU exhaustion and event-loop starvation. Because Node.js multiplexes concurrent client connections onto a single JavaScript execution thread, blocking that thread inside a synchronous constructor (new Ignore()) halts request handling for all users connected to the same process, even if the caller invoked the asynchronous glob() Promise API.
The vulnerability carries a CVSS v4.0 Base Score of 6.3 (Medium) with the vector 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. The Attack Requirements metric is marked Present (AT:P) because exploitation depends on the target application wiring external input to the ignore configuration property. Confidentiality (VC:N) and Integrity (VI:N) are unaffected, while Vulnerable System Availability is rated Low (VA:L) in the base specification, though sustained or repeated requests can render an unclustered Node.js service completely unresponsive.
The CISA ADP Vulnrichment assessment evaluates this flaw under the Stakeholder-Specific Vulnerability Categorization (SSVC) framework with Exploitation: PoC, Automatable: Yes, and Technical Impact: Partial. Public proof-of-concept payloads are directly derivable from the official regression tests committed alongside version 14.0.6.
Downstream environments at highest risk include multi-tenant CI/CD runners, cloud-based IDE and code search platforms, automated static analysis services, and web interfaces that parse user-supplied .gitignore or exclusion lists via node-glob. Note that even after upgrading to 14.0.6, submitting an ignore pattern that exceeds braceExpandMax causes glob to throw an unhandled RangeError; applications that do not wrap glob calls in try/catch blocks may still experience uncaught exception crashes if user input is passed directly without error handling.
The definitive remediation for CVE-2026-137196 is to upgrade glob to version 14.0.6 or later. Version 14.0.6 enforces braceExpandMax: 10_000 within the Ignore class by default and escapes literal braces in resolved root paths.
# Upgrade using npm
npm install glob@^14.0.6
# Upgrade using Yarn
yarn upgrade glob@^14.0.6
# Upgrade using pnpm
pnpm update glob@^14.0.6After updating, verify that no transitive dependencies remain pinned to vulnerable releases (>= 13.0.5, < 14.0.6) by inspecting the dependency graph with npm ls glob or pnpm why glob. If transitive dependencies pull in an affected version, use overrides in package.json (for npm/pnpm) or resolutions (for Yarn) to force resolution to >=14.0.6, and ensure application callers catch RangeError exceptions thrown when untrusted patterns exceed the expansion cap.
For environments where an immediate dependency upgrade is not possible, developers can implement application-layer mitigations before passing options to glob:
{a,b}) is not required for exclusion filters, pass nobrace: true in the glob options object. The Ignore constructor forwards nobrace directly to this.mmopts, neutralizing combinatorial brace payloads (though **/.. sequences should still be filtered).{ or } characters, consecutive **/.. directory traversal patterns, or input lengths exceeding a strict operational ceiling (e.g., 128 characters).glob operations inside isolated worker_threads with an explicit execution timeout (worker.terminate()), preventing synchronous pattern compilation from blocking the primary HTTP event loop.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| Product | Affected Versions | Fixed Version |
|---|---|---|
glob (node-glob) isaacs | >= 13.0.5, < 14.0.6 | 14.0.6 |
| Attribute | Detail |
|---|---|
| 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 |
The software does not properly restrict the allocation or consumption of internal system resources when processing compact inputs that expand exponentially, allowing an adversary to cause disproportionate CPU utilization and block execution threads.
Vite+ (vp) versions 0.2.9 through 1.5.0 contain an integrity verification flaw (CWE-494) in the internal package manager bootstrap mechanism. When initializing in an environment where the pinned pnpm distribution is not cached, the runtime queries the registry specified in the local workspace's .npmrc file and validates the downloaded tarball exclusively against the self-reported integrity digest provided by that same registry. An attacker who supplies a repository with a malicious .npmrc pointing to an attacker-controlled registry can achieve arbitrary code execution when a developer or CI runner invokes basic vp commands.
A local OS command injection and dynamic code evaluation vulnerability (CWE-78 / CWE-95) exists in the Vite+ global command-line interface (vp) across versions 0.3.3 through 1.5.0. When resolving package manager dist-tags such as 'latest' with the '--no-install' flag enabled, Vite+ queries the npm registry defined in the local workspace's '.npmrc' file and returns the raw version string without semantic version validation. Because this unvalidated string is interpolated directly into shell environment export statements evaluated by the user's shell wrapper, an attacker controlling the registry can inject shell metacharacters to achieve arbitrary command execution in the developer's local terminal context.
Hugo versions prior to 0.170.0 contain a path traversal and improper symlink resolution vulnerability in the module resolution and vendoring subsystem. By supplying relative traversal sequences in `_vendor/modules.txt` or crafting symbolic links within vendored directory hierarchies, an untrusted third-party theme or Hugo module can bind its module root to an arbitrary directory on the build host. During site compilation, template functions such as `readFile` can access and render sensitive files from the host filesystem into the generated static output.
A stored Cross-Site Scripting (XSS) vulnerability in the Hugo static site generator (versions 0.140.2 prior to 0.170.0) allows content authors to inject arbitrary HTML and JavaScript into generated pages. The flaw resides in the syntax highlighting component (`markup/highlight/highlight.go`), where the `wrapperClass` option is concatenated directly into an HTML `<div class="...">` attribute without HTML entity escaping. Because shortcodes and code fence attributes bypass Goldmark's raw HTML sanitization rules, untrusted contributors in multi-author workflows can achieve client-side script execution in the browsers of site visitors.
CVE-2026-139994 (GHSA-mjj8-rxh9-q8f5) is a Cross-Site Scripting (XSS) vulnerability in React Router affecting versions 7.11.0 through 7.18.3 and 8.0.0 through 8.3.1. The flaw resides in the server-side streaming handler for the unstable React Server Components (RSC) Data mode and RSC Framework mode. When a server-side redirect is triggered during an HTML stream, the framework injects an inline <meta http-equiv="refresh"> element into the response stream. Because the redirect destination URL is sanitized using an HTML body escaping utility (escapeHtml) rather than an attribute-specific encoding function, double-quote characters (") are left unescaped. An attacker who can influence the redirect URL can break out of the content attribute context, inject arbitrary attributes or HTML elements, and execute arbitrary JavaScript within the victim's browser session.
CVE-2026-139996 is a prototype pollution vulnerability (CWE-1321) in React Router's vendored turbo-stream deserializer, utilized in Framework mode for single-fetch transitions and client-server hydration. When unflattening serialized streams, the decoder assigns object properties using direct bracket notation (object[key] = value) rather than defining own properties via Object.defineProperty. Furthermore, the deserializer lacks integer and bounds validation on stream reference indices. An attacker capable of supplying crafted turbo-stream payloads to the deserializer can pollute Object.prototype or trigger arbitrary index dereferences, compromising application integrity and confidentiality.