Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. brace-expansion
  4. ›
  5. CVE-2026-14257

CVE-2026-14257: brace-expansion: DoS via unbounded expansion length causing an out-of-memory process crash

July 24, 2026 (updated July 31, 2026)

expand() bounds the number of results it produces (the max option, 100_000 by default) but not their length. By chaining many brace groups, an attacker keeps the result count under max while making every result grow with the number of groups. Building max long results — plus the intermediate arrays combined at each brace group — exhausts memory and crashes the Node process with an uncatchable out-of-memory error. try/catch around expand() does not help: the fatal error terminates the process.

A ~7.5 KB input ('{a,b}'.repeat(1500)) is enough to crash a default Node process.

References

  • github.com/advisories/GHSA-mh99-v99m-4gvg
  • github.com/juliangruber/brace-expansion
  • github.com/juliangruber/brace-expansion/commit/139d015104e71433ad52a41d19467c48ecbb2c7d
  • github.com/juliangruber/brace-expansion/commit/a1bd33999ea75262c4749fff3bbb0d1372bd07b5
  • github.com/juliangruber/brace-expansion/commit/cb4b9e47cc2ec777c14b2b4492fb431a56f6a031
  • github.com/juliangruber/brace-expansion/commit/d13ff455a58b0d56704f0111e3c2a0b16ceb06eb
  • github.com/juliangruber/brace-expansion/pull/129
  • github.com/juliangruber/brace-expansion/pull/130
  • github.com/juliangruber/brace-expansion/pull/136
  • github.com/juliangruber/brace-expansion/security/advisories/GHSA-mh99-v99m-4gvg
  • nvd.nist.gov/vuln/detail/CVE-2026-14257
  • www.npmjs.com/package/brace-expansion

Code Behaviors & Features

Detect and mitigate CVE-2026-14257 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.1.17, all versions starting from 2.0.0 before 2.1.3, all versions starting from 3.0.0 before 3.0.3, all versions starting from 4.0.0 before 5.0.8

Fixed versions

  • 1.1.17
  • 2.1.3
  • 3.0.3
  • 5.0.8

Solution

Upgrade to versions 1.1.17, 2.1.3, 3.0.3, 5.0.8 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

npm/brace-expansion/CVE-2026-14257.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:28 +0000.