CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-137196

CVE-2026-137196: Synchronous Event-Loop Denial of Service via Unbounded Ignore Pattern Expansion in node-glob

Alon Barad
Alon Barad
Software Engineer

Dec 1, 2026·10 min read·6 visits

Executive Summary (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.

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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.

Exploitation

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.

Impact Assessment

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.

Remediation

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

After 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:

  1. Disable Brace Expansion: If brace syntax ({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).
  2. Strict Input Sanitization: Validate untrusted ignore patterns against an allowlist prior to invocation. Reject strings containing { or } characters, consecutive **/.. directory traversal patterns, or input lengths exceeding a strict operational ceiling (e.g., 128 characters).
  3. Worker Thread Isolation: If untrusted complex globbing must be supported, execute glob operations inside isolated worker_threads with an explicit execution timeout (worker.terminate()), preventing synchronous pattern compilation from blocking the primary HTTP event loop.

Official Patches

GitHub / isaacsOfficial GitHub Security Advisory for GHSA-qxr8-q827-836c
GitHub / isaacsGit commit patching src/ignore.ts and src/walker.ts
GitHub / isaacsnode-glob v14.0.6 release tag

Fix Analysis (2)

Technical Appendix

CVSS Score
6.3/ 10
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 Systems

isaacs/node-glob (npm package: glob) >= 13.0.5, < 14.0.6

Affected Versions Detail

Product
Affected Versions
Fixed Version
glob (node-glob)
isaacs
>= 13.0.5, < 14.0.614.0.6
AttributeDetail
CVE / Advisory IDCVE-2026-137196 / GHSA-qxr8-q827-836c
Vulnerability ClassCWE-405: Asymmetric Resource Consumption (Amplification) / CWE-400
Affected Componentisaacs/node-glob (npm: glob) Ignore class in src/ignore.ts (>= 13.0.5, < 14.0.6)
CVSS v4.0 Score6.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 VectorNetwork / Untrusted input passed to the glob 'ignore' option
Security ImpactSynchronous Node.js event-loop starvation and Denial of Service via O(n^2) pattern preprocessing
Exploit MaturityProof of Concept (PoC) publicly available in official regression suite
Fixed Versionglob v14.0.6

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-405
Asymmetric Resource Consumption (Amplification)

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.

Known Exploits & Detection

GitHubOfficial fix commit containing regression unit tests demonstrating 2^14 '**/..' traversal amplification and brace expansion payloads against the Ignore class.

Vulnerability Timeline

Vulnerability patched in commit 17cb20749bc65a64ec44d40de2736cc587564866 and released in node-glob v14.0.6.
2026-11-12
CVE-2026-137196 reserved by GitHub CNA.
2026-11-25
GitHub Security Advisory GHSA-qxr8-q827-836c and CVE-2026-137196 officially published.
2026-11-30
CISA ADP Vulnrichment assessment published (SSVC Exploitation: PoC, Automatable: Yes) and NVD record indexed.
2026-11-30

References & Sources

  • [1]GitHub Security Advisory GHSA-qxr8-q827-836c (isaacs/node-glob)
  • [2]GitHub Advisory Database: GHSA-qxr8-q827-836c
  • [3]Patch Commit 17cb20749bc65a64ec44d40de2736cc587564866
  • [4]Release Commit 908e6169a79870d8694124f197f5aa052c6cfe2a (v14.0.6)
  • [5]node-glob v14.0.6 Release Notes
  • [6]National Vulnerability Database (NVD) - CVE-2026-137196
  • [7]CVE.org Record: CVE-2026-137196
  • [8]OSV.dev Vulnerability Entry: GHSA-qxr8-q827-836c
  • [9]CVEListV5 Official JSON Record for CVE-2026-137196

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-137191
7.8

CVE-2026-137191: Arbitrary Code Execution via Unverified Package Manager Bootstrap in Vite+ (vp)

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.

Alon Barad
Alon Barad
1 views•9 min read
•about 2 hours ago•CVE-2026-137190
7.0

CVE-2026-137190: Shell Command Injection in Vite+ Global CLI via Unvalidated Registry Version String

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.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•GHSA-R48V-R4VW-H9V8
5.5

GHSA-r48v-r4vw-h9v8: Arbitrary Build-Host File Disclosure via Path Traversal in Hugo Vendored Module Metadata

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.

Alon Barad
Alon Barad
5 views•9 min read
•about 5 hours ago•GHSA-4WHP-JX7J-XVRM
5.1

GHSA-4whp-jx7j-xvrm: Stored Cross-Site Scripting in Hugo Syntax Highlighter via wrapperClass

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.

Alon Barad
Alon Barad
4 views•9 min read
•about 7 hours ago•CVE-2026-139994
4.7

CVE-2026-139994: Cross-Site Scripting via Context-Mismatched HTML Escaping in React Router RSC Streaming Redirects

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.

Alon Barad
Alon Barad
8 views•11 min read
•about 8 hours ago•CVE-2026-139996
7.4

CVE-2026-139996: Prototype Pollution in React Router via Vendored turbo-stream Deserializer

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.

Amit Schendel
Amit Schendel
6 views•9 min read