npm
CVE-2026-45149
brace-expansion: Large numeric range defeats documented `max` DoS protection
- Severity
- Medium 6.5
- Published
- 18 May 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 5.0.6
- Exploit chance
- 0.3% in the next 30 daysHigher than 23% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · No login needed · Needs someone to click or open something
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H- Also known as
- GHSA-jxxr-4gwj-5jf2
- Sources
- OSV.dev and GitHub
Description
The max option was being applied too late:
When expanding a single large numeric range like {1..10000000}, the sequence generation loop generates all 10 million intermediate elements before the max limit is applied With max=10, the output is correctly limited to 10 items, but the process still allocates ~505 MB and spends ~800ms building the full intermediate array.
Workarounds
Ensure the string to be expanded doesn't contain more values than the desired max item count.
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-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
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-45149
- GitHub Advisory Database https://github.com/advisories/GHSA-jxxr-4gwj-5jf2