CVE-2025-5889: brace-expansion Regular Expression Denial of Service vulnerability
Low CVSS 3.1
- OSV id
- GHSA-v6h2-p8h4-qcjw
- Also known as
- CVE-2025-5889
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| brace-expansion npm |
>= 2.0.0, < 2.0.2 | 2.0.2 |
| brace-expansion npm |
>= 1.0.0, < 1.1.12 | 1.1.12 |
| brace-expansion npm |
>= 3.0.0, < 3.0.1 | 3.0.1 |
| brace-expansion npm |
>= 4.0.0, < 4.0.1 | 4.0.1 |
Versions we track that it affects: brace-expansion 2.0.1; brace-expansion 2.0.1; brace-expansion 2.0.1; brace-expansion 2.0.1
How to fix it
brace-expansion (npm)
Upgrade brace-expansion to 2.0.2 or later.
npm install brace-expansion@2.0.2
# if it is an indirect dependency: npm update brace-expansion (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
brace-expansion (npm)
Upgrade brace-expansion to 1.1.12 or later.
npm install brace-expansion@1.1.12
# if it is an indirect dependency: npm update brace-expansion (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
brace-expansion (npm)
Upgrade brace-expansion to 3.0.1 or later.
npm install brace-expansion@3.0.1
# if it is an indirect dependency: npm update brace-expansion (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
brace-expansion (npm)
Upgrade brace-expansion to 4.0.1 or later.
npm install brace-expansion@4.0.1
# if it is an indirect dependency: npm update brace-expansion (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
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.
References
- GHSA-v6h2-p8h4-qcjw on OSV.dev
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2025-5889
- Web: https://github.com/juliangruber/brace-expansion/pull/65/commits/a5b98a4f30d7813266b221435e1eaaf25a1b0ac5
- Web: https://github.com/juliangruber/brace-expansion/commit/0b6a9781e18e9d2769bb2931f4856d1360243ed2
- Web: https://github.com/juliangruber/brace-expansion/commit/15f9b3c75ebf5988198241fecaebdc45eff28a9f
- Web: https://github.com/juliangruber/brace-expansion/commit/36603d5f3599a37af9e85eda30acd7d28599c36e
- Web: https://github.com/juliangruber/brace-expansion/commit/c3c73c8b088defc70851843be88ccc3af08e7217
- Web: https://gist.github.com/mmmsssttt404/37a40ce7d6e5ca604858fe30814d9466
- Package: https://github.com/juliangruber/brace-expansion
- Web: https://vuldb.com/?ctiid.311660
- Web: https://vuldb.com/?id.311660
- Web: https://vuldb.com/?submit.585717
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.