# CVE-2026-45149: brace-expansion: Large numeric range defeats documented `max` DoS protection

> Attackers can cause excessive memory and CPU consumption in the brace-expansion library by triggering large numeric range expansions before the limit is applied.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 May 2026
- **Updated:** 1 Jun 2026
- **Also known as:** CLEANSTART-2026-EQ50316, CLEANSTART-2026-GE92046, CLEANSTART-2026-HT65704, CLEANSTART-2026-ZT84089, CLSA-2026-1791215768, CLSA-2026-1791226577, DEBIAN-CVE-2026-45149, ECHO-b5c0-4020-9633, GHSA-jxxr-4gwj-5jf2, MINI-5r6j-f2m5-pg5v, MINI-682j-hr9p-pp7p, MINI-97px-33gj-7h87, MINI-cj2c-q547-3m6v, MINI-cp3w-q34f-8mpm, MINI-fwq6-3xjv-47f9, MINI-hqx4-qpv3-xp9h, MINI-p9qf-rf93-g6w7, MINI-q6x9-2qp2-xjqc, MINI-vmr3-6pqh-wrw4, MINI-wg87-g3jg-gh3x, RHSA-2026:13874, ROOT-APP-NPM-CVE-2026-45149, UBUNTU-CVE-2026-45149

## What is CVE-2026-45149?

CVE-2026-45149 is a medium-severity denial of service vulnerability in juliangruber brace-expansion, published on 29 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The brace-expansion library generates arbitrary strings containing a common prefix and suffix. From 5.0.0 to before 5.0.6, 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. This vulnerability is fixed in 5.0.6.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-45149?

2 open source packages ship an affected version, including brace-expansion. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `brace-expansion` | npm | From 5.0.0 | 5.0.6 |
| `brace-expansion` | npm | From 5.0.0 | 5.0.6 |
| `nodejs24` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-bin` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-devel` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-docs` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-full-i18n` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-libs` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |
| `nodejs24-npm` | Red Hat:hummingbird:1 | All versions | 0:11.12.1-1.24.15.0.1.hum1 |
| `nodejs24-npm-bin` | Red Hat:hummingbird:1 | All versions | 0:24.15.0-1.hum1 |

Products: Juliangruber Brace-Expansion.

## How do I fix CVE-2026-45149?

Upgrade brace-expansion to 5.0.6 or later.

## Is CVE-2026-45149 being exploited?

There is no known exploitation of CVE-2026-45149 in the wild and no public exploit code.

## Other vulnerabilities in juliangruber brace-expansion

- [CVE-2026-69152](https://insights.sbomify.com/CVE-2026-69152/): brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation (high 7.5)
- [CVE-2026-14257](https://insights.sbomify.com/CVE-2026-14257/): brace-expansion DoS via unbounded expansion length causing an out-of-memory process crash (high 7.5)
- [CVE-2026-33750](https://insights.sbomify.com/CVE-2026-33750/): brace-expansion: Zero-step sequence causes process hang and memory exhaustion (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45149 and fix it if it is affected.

What it is: CVE-2026-45149 is a medium-severity denial of service vulnerability in juliangruber brace-expansion, published on 29 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-45149 in the wild and no public exploit code.

Affected packages and fixed versions:
- brace-expansion (npm): affected from 5.0.0; fixed in 5.0.6
- brace-expansion (npm): affected from 5.0.0; fixed in 5.0.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45149/ (Markdown: https://insights.sbomify.com/CVE-2026-45149/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45149
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45149
- OSV: https://osv.dev/vulnerability/CVE-2026-45149

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45149/
Summaries are generated and may contain mistakes; the official description above is the record.
