CVE-2025-5889 — brace-expansion
Fix: juliangruber/brace-expansion#65CVE-2025-5889 is a Uncontrolled Resource Consumption vulnerability in brace-expansion. A fix is available for brace-expansion — see the affected versions and patch details below.
juliangruber brace-expansion index.js expand redos
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-5889.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
brace-expansionnpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | brace-expansion | ≥ 2.0.0&&< 2.0.2 | 2.0.2npm install brace-expansion@2.0.2 |
| 📦npm | brace-expansion | ≥ 1.0.0&&< 1.1.12 | 1.1.12npm install brace-expansion@1.1.12 |
| 📦npm | brace-expansion | ≥ 3.0.0&&< 3.0.1 | 3.0.1npm install brace-expansion@3.0.1 |
| 📦npm | brace-expansion | ≥ 4.0.0&&< 4.0.1 | 4.0.1npm install brace-expansion@4.0.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for brace-expansion, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update brace-expansion to 2.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-5889 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ceph Storage 7.1 | rhceph/rhceph-7-rhel9:1781863705 | RHSA-2026:33154 |
| Red Hat Openshift Data Foundation 4.14 | odf4/cephcsi-rhel9:v4.14-1764178221 | RHSA-2025:22420 |
| Red Hat Openshift Data Foundation 4.15 | odf4/cephcsi-rhel9:v4.15-1764176261 | RHSA-2025:22418 |
| Red Hat Openshift Data Foundation 4.16 | odf4/cephcsi-rhel9:v4.16-1764168955 | RHSA-2025:22416 |
| Red Hat Openshift Data Foundation 4.17 | odf4/cephcsi-rhel9:v4.17-1764167834 | RHSA-2025:22415 |
| Red Hat Openshift Data Foundation 4.18 | odf4/cephcsi-rhel9:v4.18-1761854289 | RHSA-2025:21368 |
| Red Hat Openshift Data Foundation 4.19 | odf4/cephcsi-rhel9:v4.19-1761844221 | RHSA-2025:21378 |
| Red Hat Openshift Data Foundation 4.20 | odf4/cephcsi-rhel9:v4.20-1761848902 | RHSA-2025:21704 |
Frequently Asked Questions
Is CVE-2025-5889 in your dependencies?
Find it across npm, including transitive dependencies.