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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.3
- **CVSS:** 2.3 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Attack requirements: None; Privileges required: Low; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Proof of concept
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.76% (percentile 52, 2026-11-26)
- **CWE:** CWE-1333, CWE-400
- **Aliases:** GHSA-v6h2-p8h4-qcjw
- **Published:** 2025-06-09T18:16:01.889Z
- **Modified:** 2026-09-10T03:50:25.501Z

## Who should check

- Projects that depend on npm package brace-expansion (\>= 2.0.0, \< 2.0.2)
- Anyone running juliangruber brace-expansion 1.1.0; 1.1.1; 1.1.2; 1.1.3; 1.1.4; 1.1.5; 1.1.6; 1.1.7; 1.1.8; 1.1.9; …

## 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.

## Affected and fixed versions

- npm `brace-expansion`: affected \>= 2.0.0, \< 2.0.2; fixed 2.0.2, 1.1.12, 3.0.1, 4.0.1 (osv)
- juliangruber brace-expansion: 1.1.0; 1.1.1; 1.1.2; 1.1.3; 1.1.4; 1.1.5; 1.1.6; 1.1.7; 1.1.8; 1.1.9; … (cvelist)

## Mitigation

- Upgrade brace-expansion to one of 2.0.2, 1.1.12, 3.0.1, 4.0.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-5889. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-5889.md
Affected: brace-expansion >= 2.0.0, < 2.0.2
Fixed in: 2.0.2, 1.1.12, 3.0.1, 4.0.1

Steps:
1. Search this machine and project for brace-expansion (npm), juliangruber brace-expansion: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-5889 being exploited?

There is no confirmed exploitation: CVE-2025-5889 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.76% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-5889?

Low: CVSS 2.3 (v4.0, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

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

brace-expansion \>= 2.0.0, \< 2.0.2.

### Is there a fix for CVE-2025-5889?

Yes. Fixed in 2.0.2, 1.1.12, 3.0.1, 4.0.1. Upgrade brace-expansion to one of 2.0.2, 1.1.12, 3.0.1, 4.0.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2025-5889?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-5889>
- patch: <https://github.com/juliangruber/brace-expansion/pull/65/commits/a5b98a4f30d7813266b221435e1eaaf25a1b0ac5>
- patch: <https://github.com/juliangruber/brace-expansion/releases/tag/v4.0.1>
- patch: <https://github.com/juliangruber/brace-expansion/commit/0b6a9781e18e9d2769bb2931f4856d1360243ed2>
- patch: <https://github.com/juliangruber/brace-expansion/commit/15f9b3c75ebf5988198241fecaebdc45eff28a9f>
- patch: <https://github.com/juliangruber/brace-expansion/commit/36603d5f3599a37af9e85eda30acd7d28599c36e>
- patch: <https://github.com/juliangruber/brace-expansion/commit/c3c73c8b088defc70851843be88ccc3af08e7217>
- exploit: <https://gist.github.com/mmmsssttt404/37a40ce7d6e5ca604858fe30814d9466>
- article: <https://vuldb.com/?id.311660>
- other: <https://vuldb.com/?ctiid.311660>
- other: <https://vuldb.com/?submit.585717>
- other: <https://github.com/juliangruber/brace-expansion>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-5889>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-v6h2-p8h4-qcjw> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-5889> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-5889>
