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
•Technically reviewed by Anupam Mediratta•Published August 16, 2026•Reviewed 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

Lampa Desktop Auto-Update Heuristic Bypass: Execution of Unverified

Lampa Desktop's auto-update mechanism downloaded JavaScript and CSS from `raw.githubusercontent.com` using only heuristic validation—file size thresholds and string pattern matching—that attackers could trivially satisfy. The fix introduces cryptographic integrity verification by cross-referencing Git blob hashes from the GitHub Contents API, ensuring downloaded code matches the repository's authoritative state before execution.

high

adm-zip 0.6.0 Preserves SUID Bits From ZIPs: CVE-2026-102282

The `adm-zip` dependency resolved to 0.6.0 in this project's dependency tree, a version affected by CVE-2026-102282: during extraction it applies the Unix permission bits stored in each ZIP entry's external file attributes verbatim, including the setuid (`04000`), setgid (`02000`), and sticky bits. An attacker who controls an archive passed to `extractAllTo()` or `extractEntryTo()` can therefore have the extractor create a setuid binary owned by whatever user the extraction process runs as. The

high

requestInput() Type Confusion: NaN and Object Bypass in JavaScript

The `requestInput()` utility function lacked validation on its `type` parameter and failed to handle `NaN` results from float conversions, creating a type confusion weakness. An attacker could supply malformed inputs that propagate unhandled `NaN` values or unexpected object types through the type system. The fix adds explicit guards against `NaN` type parameters and rejects non-primitive type values.

critical

No Rate Limit on /api/uploads/presign Enables DoS

The `/api/uploads/presign` endpoint accepted unlimited concurrent requests to generate storage presigned URLs, giving an attacker a free lever to exhaust storage-provider quotas and server resources. The fix adds an `express-rate-limit` middleware capping each client to 30 requests per minute on that route.

high

CVE-2026-54673: builder-util-runtime Leaks Auth Headers on Redirect

electron-updater and electron-builder rely on builder-util-runtime to fetch update manifests and artifacts over HTTP. A flaw in that shared HTTP executor allowed credential headers attached to the original update-feed request to be re-sent after a redirect, exposing them to any host the redirect pointed to. The project fixes this by upgrading builder-util-runtime to 9.7.0 and collapsing a duplicate, older copy of the package that electron-updater had pinned on its own.

high

image-size 1.2.1 DoS: Zero-Valued Dimensions in Image Buffer Parser

A high-severity denial-of-service vulnerability in image-size 1.2.1 allows attackers to crash Node.js services using malicious image buffers with zero-valued dimensions. The fix removes the vulnerable `queue` dependency and tightens dimension validation in version 2.0.3.