# CVE-2025-5889: juliangruber brace-expansion index.js expand redos

> Remote attackers can cause denial of service via inefficient regular expression complexity in the brace-expansion library, requiring an upgrade to fix.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Jun 2025
- **Updated:** 11 Jun 2025
- **Also known as:** AZL-63689, AZL-63692, AZL-63704, AZL-63707, AZL-63881, CLEANSTART-2026-IZ17087, CLSA-2026-1772669618, DEBIAN-CVE-2025-5889, ECHO-0e6d-1718-0c34, GHSA-v6h2-p8h4-qcjw, MINI-625q-wjfj-fr46, MINI-8576-2xq6-h45v, MINI-8598-94rq-26j6, MINI-87r2-m294-7r9m, MINI-8gjv-q8gv-g55x, MINI-9fmj-4g6v-hjhw, MINI-c8hp-w2p3-ppcg, MINI-cf5m-v4c6-chgg, MINI-cvc4-gv7h-mcc2, MINI-fh5h-ff92-988m, MINI-hr2r-23m4-p79q, MINI-jhg8-3g7g-q6mp, MINI-jwfx-783j-pc8r, MINI-p333-c779-r3xx, MINI-pgvx-g3gc-xf38, MINI-pwvh-rchh-c3m8, MINI-rc4p-8wv8-m6hg, MINI-x97p-j2qh-c2mc, OESA-2025-1645, ROOT-APP-NPM-CVE-2025-5889, UBUNTU-CVE-2025-5889, openSUSE-SU-2025:15269-1, openSUSE-SU-2025:15270-1, openSUSE-SU-2025:15271-1, openSUSE-SU-2025:15273-1, openSUSE-SU-2025:15274-1, openSUSE-SU-2025:15275-1, openSUSE-SU-2025:15276-1, openSUSE-SU-2025:15277-1, openSUSE-SU-2025:15278-1, openSUSE-SU-2025:15279-1

## What is CVE-2025-5889?

CVE-2025-5889 is a low-severity denial of service vulnerability in juliangruber brace-expansion, published on 9 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A vulnerability was found in juliangruber brace-expansion up to 1.1.11/2.0.1/3.0.0/4.0.0. It has been rated as problematic. Affected by this issue is the function expand of the file index.js. The manipulation leads to inefficient regular expression complexity. The attack may be launched remotely. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used. Upgrading to version 1.1.12, 2.0.2, 3.0.1 and 4.0.1 is able to address this issue. The name of the patch is a5b98a4f30d7813266b221435e1eaaf25a1b0ac5. It is recommended to upgrade the affected component.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2025-5889?

8 open source packages ship an affected version, including brace-expansion.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `brace-expansion` | npm | From 1.0.0 | 1.1.12 |
| `brace-expansion` | npm | From 1.0.0 | 1.1.12 |
| `brace-expansion` | npm | From 2.0.0 | 2.0.2 |
| `brace-expansion` | npm | From 2.0.0 | 2.0.2 |
| `brace-expansion` | npm | From 3.0.0 | 3.0.1 |
| `brace-expansion` | npm | From 3.0.0 | 3.0.1 |
| `brace-expansion` | npm | From 4.0.0 | 4.0.1 |
| `brace-expansion` | npm | From 4.0.0 | 4.0.1 |
| `python-bqplot` | openSUSE:Tumbleweed | All versions | 0.12.45-10.1 |
| `python-furo` | openSUSE:Tumbleweed | All versions | 2024.8.6-3.1 |
| `python-ipympl` | openSUSE:Tumbleweed | All versions | 0.9.4-15.1 |
| `python-jupyter-ydoc` | openSUSE:Tumbleweed | All versions | 3.1.0-1.1 |
| `python-jupyterlab-templates` | openSUSE:Tumbleweed | All versions | 0.5.2-2.1 |
| `python-nbclassic` | openSUSE:Tumbleweed | All versions | 1.3.1-1.1 |
| `python-nbdime` | openSUSE:Tumbleweed | All versions | 4.0.2-20.1 |
| `python-panel` | openSUSE:Tumbleweed | All versions | 1.7.1-1.1 |
| `python-plotly` | openSUSE:Tumbleweed | All versions | 6.1.2-1.1 |
| `python-pydata-sphinx-theme` | openSUSE:Tumbleweed | All versions | 0.16.1-1.1 |

## How do I fix CVE-2025-5889?

Upgrade brace-expansion to a fixed version for your release line: 1.1.12, 2.0.2, 3.0.1 or 4.0.1.

## Is CVE-2025-5889 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5889 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-5889 and fix it if it is affected.

What it is: CVE-2025-5889 is a low-severity denial of service vulnerability in juliangruber brace-expansion, published on 9 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5889 exists.

Affected packages and fixed versions:
- brace-expansion (npm): affected from 1.0.0; fixed in 1.1.12
- brace-expansion (npm): affected from 1.0.0; fixed in 1.1.12
- brace-expansion (npm): affected from 2.0.0; fixed in 2.0.2
- brace-expansion (npm): affected from 2.0.0; fixed in 2.0.2
- brace-expansion (npm): affected from 3.0.0; fixed in 3.0.1
- brace-expansion (npm): affected from 3.0.0; fixed in 3.0.1
- brace-expansion (npm): affected from 4.0.0; fixed in 4.0.1
- brace-expansion (npm): affected from 4.0.0; fixed in 4.0.1

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-2025-5889/ (Markdown: https://insights.sbomify.com/CVE-2025-5889/index.md)
```

## Sources

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

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