Back to Blog
high SEVERITY6 min read

How Denial of Service via unbounded intermediate arrays happens in Node.js dependencies and how to fix it

A high-severity Denial of Service vulnerability (CVE-2026-69152) was discovered in the `brace-expansion` npm package, where crafted input could generate unbounded intermediate arrays that exhaust system memory. This bypasses the earlier CVE-2026-14257 mitigation. The fix upgrades `brace-expansion` from version 1.1.12 (and 2.0.2) to patched versions 1.1.18 across the dependency tree in the `exia-invasion` project.

O
By Orbis AppSec
Published August 16, 2026Reviewed August 16, 2026

Answer Summary

CVE-2026-69152 is a high-severity Denial of Service (DoS) vulnerability in the Node.js `brace-expansion` package (CWE-400) where specially crafted brace patterns generate unbounded intermediate arrays, bypassing the earlier CVE-2026-14257 fix. It affects versions prior to 1.1.18, 2.1.4, 3.0.6, and 5.0.9. The fix is to upgrade `brace-expansion` to a patched version that enforces bounds on intermediate array growth during expansion.

Vulnerability at a Glance

cweCWE-400 (Uncontrolled Resource Consumption)
fixUpgrade brace-expansion to 1.1.18 (or 2.1.4, 3.0.6, 5.0.9) which enforces intermediate array bounds
riskApplication crash or unresponsiveness from memory exhaustion when processing crafted brace patterns
languageJavaScript (Node.js)
root causebrace-expansion generates unbounded intermediate arrays during expansion, bypassing prior size limits
vulnerabilityDenial of Service (DoS) via unbounded intermediate arrays

Introduction

In the exia-invasion project, a high-severity Denial of Service vulnerability was identified in the package-lock.json dependency tree. The brace-expansion package at version 1.1.12—used transitively through minimatch and readdir-glob—contained a flaw that allowed crafted brace patterns to generate unbounded intermediate arrays, exhausting system memory and crashing the application.

What makes CVE-2026-69152 particularly dangerous is that it bypasses the earlier CVE-2026-14257 mitigation. The prior fix added limits to final expansion output, but the new vulnerability exploits the intermediate expansion steps where arrays grow without bounds before any size check is applied. This means projects that believed they were patched against brace-expansion DoS attacks remained vulnerable.

The vulnerability was present in two locations within exia-invasion/package-lock.json: the top-level brace-expansion at version 1.1.12 and a nested instance under readdir-glob/node_modules/brace-expansion at version 2.0.2.

The Vulnerability Explained

How brace-expansion works

The brace-expansion package expands shell-like brace patterns into arrays. For example:

"{a,b}{c,d}" → ["ac", "ad", "bc", "bd"]

This is used by minimatch for glob pattern matching, which in turn powers file system operations in many Node.js applications.

The unbounded intermediate array problem

During expansion, brace-expansion processes nested patterns iteratively. Each level of nesting multiplies the intermediate result array. The CVE-2026-14257 fix added a check on the final output size, but CVE-2026-69152 exploits the fact that intermediate arrays generated between expansion steps have no such bounds.

Consider a crafted input like:

"{a{1..9999},b{1..9999}}{c{1..9999},d{1..9999}}"

Before the final output check kicks in, the intermediate expansion of inner braces creates massive temporary arrays. An attacker can craft patterns where these intermediate arrays grow exponentially while the final output appears bounded—effectively bypassing the prior mitigation.

The vulnerable dependency tree

In exia-invasion/package-lock.json, the vulnerable versions were:

"node_modules/brace-expansion": {
  "version": "1.1.12",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
  "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="
}

And the nested version under readdir-glob:

"node_modules/readdir-glob/node_modules/brace-expansion": {
  "version": "2.0.2",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
  "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="
}

Attack scenario

If the exia-invasion application processes user-supplied glob patterns (e.g., for file selection, search filtering, or path matching), an attacker could submit a specially crafted brace pattern that triggers exponential intermediate array growth. This would cause:

  1. Memory exhaustion: The Node.js process allocates gigabytes of memory for intermediate arrays
  2. Process crash: The system runs out of memory, triggering an OOM kill
  3. Service unavailability: The application becomes unresponsive to legitimate requests

Even if the application doesn't directly expose glob matching to users, any code path where minimatch or readdir-glob processes partially user-influenced patterns (directory names, file filters) could be exploited.

The Fix

Changes made

The fix upgrades brace-expansion across the entire dependency tree to version 1.1.18, which enforces bounds on intermediate array growth during expansion.

Before — vulnerable brace-expansion 1.1.12 at the top level:

"node_modules/brace-expansion": {
  "version": "1.1.12",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
  "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="
}

After — patched brace-expansion 1.1.18:

"node_modules/brace-expansion": {
  "version": "1.1.18",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
  "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="
}

Eliminating the nested vulnerable version

The fix also removes the nested brace-expansion 2.0.2 under readdir-glob/node_modules/ and replaces it with a properly scoped 1.1.18 instance under readdir-glob/node_modules/minimatch/node_modules/:

Before — vulnerable nested version:

"node_modules/readdir-glob/node_modules/brace-expansion": {
  "version": "2.0.2",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
  "dependencies": {
    "balanced-match": "^1.0.0"
  }
}

After — patched version scoped correctly:

"node_modules/readdir-glob/node_modules/minimatch/node_modules/brace-expansion": {
  "version": "1.1.18",
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
  "dependencies": {
    "balanced-match": "^1.0.0",
    "concat-map": "0.0.1"
  }
}

Why both changes matter

  1. Top-level upgrade (1.1.12 → 1.1.18): Fixes the primary brace-expansion used by most of the dependency tree
  2. Nested version restructuring (2.0.2 removed, 1.1.18 added under minimatch): Ensures readdir-glob's minimatch dependency also uses a patched version, preventing the vulnerability from lurking in a transitive dependency

The version 1.1.18 adds intermediate array size checks that abort expansion before memory can be exhausted, regardless of how the pattern is structured.

Key Takeaways

  • Bypass vulnerabilities are real: CVE-2026-69152 specifically bypasses CVE-2026-14257's mitigation by exploiting intermediate array growth rather than final output size—always verify that security fixes cover all code paths
  • Nested dependencies in package-lock.json can harbor separate vulnerable versions: The readdir-glob/node_modules/brace-expansion at 2.0.2 was a distinct vulnerable instance from the top-level 1.1.12
  • Even "utility" packages like brace-expansion can be high-severity attack vectors: This package is used by minimatch, which is one of the most depended-upon packages in the npm ecosystem
  • Lock file restructuring may be necessary: Simply bumping a version number isn't always sufficient—the fix required removing a nested dependency and re-scoping it under the correct parent
  • DoS vulnerabilities in pattern expansion libraries affect any application processing user-influenced file paths or glob patterns

How Orbis AppSec Detected This

  • Source: User-influenced input reaching glob pattern processing (file paths, search patterns, or directory filters passed to minimatch or readdir-glob)
  • Sink: brace-expansion expansion function in node_modules/brace-expansion/index.js where intermediate arrays are generated without bounds
  • Missing control: No intermediate array size limit during brace expansion steps—only final output was bounded by the CVE-2026-14257 fix
  • CWE: CWE-400 (Uncontrolled Resource Consumption)
  • Fix: Upgraded brace-expansion from 1.1.12 and 2.0.2 to 1.1.18 across the dependency tree, which enforces intermediate array bounds during expansion

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-69152 is a stark reminder that security patches aren't always complete on the first attempt. The original CVE-2026-14257 fix addressed final output bounds but left intermediate arrays unchecked—a gap that attackers could exploit to achieve the same DoS effect. By upgrading brace-expansion to 1.1.18 and restructuring the nested dependency tree, the exia-invasion project eliminates both the direct and transitive exposure to this vulnerability.

For any Node.js project using minimatch, readdir-glob, or any package that depends on brace-expansion, verify your package-lock.json contains version 1.1.18+, 2.1.4+, 3.0.6+, or 5.0.9+ depending on your major version line. Run npm audit today to check.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #21

Related Articles

critical

deleteNestedProperty Prototype Pollution via Dot-Notation Path

The `deleteNestedProperty` function in propertyUtils.ts allowed attackers to manipulate JavaScript object prototypes by passing specially crafted dot-notation paths like `__proto__.polluted`. A fix now blocks dangerous keys before processing, preventing prototype pollution attacks that could affect all objects in the application.

high

How Denial of Service via Infinite Loop Happens in JavaScript Dependencies and How to Fix It

CVE-2026-67213 is a high-severity denial of service vulnerability in nanoid before version 5.1.6 that triggers an infinite loop during random ID generation when processing specially crafted input. We upgraded nanoid across the entire dependency tree to patch this flaw and prevent attackers from freezing application threads. This fix ensures that ID generation remains resilient even when handling adversarial input patterns.

high

How Sensitive Data Exposure happens in Zotero plugins and how to fix it

A high-severity data exposure vulnerability in `Zotero.ts` automatically transmitted complete document metadata—including private notes, attachment paths, and tags—to external LLM services without user consent. The fix replaces broad `item.toJSON()` serialization with explicit field selection, sending only essential bibliographic data.

high

How missing dependency update cooldowns happen in GitHub Dependabot configurations and how to fix it

A semgrep scan flagged `.github/dependabot.yml` for lacking a cooldown period, meaning Dependabot would immediately propose updates to brand-new package versions across npm, Bundler, and Docker ecosystems. The fix adds a `cooldown: default-days: 7` block to every `package-ecosystem` entry, forcing a one-week waiting period before newly published releases are considered — reducing exposure to malicious or unstable package drops.

high

How Path Traversal Happens in TensorFlow's Data Service and How to Fix It

TensorFlow's data service dispatcher validated dataset IDs against forward-slash traversal attacks but overlooked backslash characters on non-Windows platforms, allowing attackers to escape the root directory. A targeted fix adds explicit backslash validation across all platforms, closing a high-severity path traversal vulnerability in the snapshot management system.

critical

How Unbounded WebSocket Message Handling Causes Resource Exhaustion in Node.js and How to Fix It

The WebSocketCrossServerAdapter class in a popular Node.js WebSocket library lacked any rate limiting on inbound messages, allowing attackers to flood Redis nodes and WebSocket servers with high-volume traffic. The fix introduces a configurable `rateLimit` option that caps messages per connection per second, preventing resource exhaustion while preserving legitimate functionality.