npm
CVE-2026-14257
brace-expansion: DoS via unbounded expansion length causing an out-of-memory process crash
- Severity
- High 7.5
- Published
- 24 Jul 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 1.1.17, 2.1.3, 3.0.3, 5.0.8
- Exploit chance
- 0.6% in the next 30 daysHigher than 51% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-mh99-v99m-4gvg
- Sources
- OSV.dev and GitHub
Description
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.
For N chained brace groups such as '{a,b}'.repeat(N):
- the result count is 2^N, immediately capped at max (100_000), so the max protection appears to hold, but
- each result is N characters long, so the total output size is max × N characters, which grows without bound in N.
expand_ combines each brace set with the fully-expanded tail:
Affected software
| Software | Affected versions |
|---|---|
brace-expansionnpm · osv:npm:brace-expansion |
|
About brace-expansion
- Weekly downloads (npm)
- 838,345,228npm, 16 Nov 2026
Vulnerabilities in brace-expansion
- In our list
- 7
- Published in the last 12 months
- 7
- Critical, last 12 months
- 0
- High, last 12 months
- 5
- Known exploited
- 0
- CVE-2026-102277brace-expansion: Quadratic-time expansion of the `{a},b}` rewrite causes CPU denial of serviceMedium 5.3 29 Sept 2026
- CVE-2026-102278brace-expansion: DoS via uncontrolled recursion on nested brace groups causing stack exhaustionHigh 7.5 29 Sept 2026
- CVE-2026-102276brace-expansion: DoS via uncontrolled recursion in parseCommaParts causing stack exhaustionHigh 7.5 29 Sept 2026
- CVE-2026-69152brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigationHigh 7.5 3 Aug 2026
- CVE-2026-13149brace-expansion: DoS via exponential-time expansion of consecutive non-expanding {} groupsHigh 5.3 20 Jul 2026
- CVE-2026-45149brace-expansion: Large numeric range defeats documented `max` DoS protectionMedium 6.5 18 May 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-14257
- GitHub Advisory Database https://github.com/advisories/GHSA-mh99-v99m-4gvg