npm
CVE-2026-102278
brace-expansion: DoS via uncontrolled recursion on nested brace groups causing stack exhaustion
- Severity
- High 7.5
- Published
- 29 Sept 2026
- Last changed
- 30 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 1.1.20, 2.1.6, 3.0.8, 5.0.11
- Exploit chance
- 0.5% in the next 30 daysHigher than 42% 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-qhr7-859c-m2p7
- Sources
- OSV.dev and GitHub
Description
expand_() recurses once per level of brace nesting. Deeply nested input exhausts the native stack and crashes the process.
This is distinct from CVE-2026-14257 / GHSA-mh99-v99m-4gvg, which made the tail iterative (recursion on m.post, driven by how many groups are chained). Nesting depth drives a different recursion that the tail fix never touched, so the documented constant-stack-depth guarantee only ever covered chained input, not nested input.
It is also distinct from GHSA-6j4f-fj2g-mc7p, which fixed recursion in parseCommaParts(). Both payloads below still crash with that fix applied.
Comma members. Each alternative of a brace set is expanded by a recursive call, so nesting a set inside every alternative recurses once per level:
Crashes at depth 3,907 - about 15.6 KB of input.
Single set. A brace set whose body parses to a single part is expanded by a recursive call before being re-wrapped (x{{a,b}}y -> x{a}y x{b}y), which recurses once per nesting level:
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-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-14257brace-expansion: DoS via unbounded expansion length causing an out-of-memory process crashHigh 7.5 24 Jul 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-102278
- GitHub Advisory Database https://github.com/advisories/GHSA-qhr7-859c-m2p7