CVE-2025-5889: Brace expansion Denial of Service Vulnerability
LOWCVE-2025-5889 is a LOW (CVSS 3.1) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Brace expansion libraries in the npm ecosystem. The issue involves brace-expansion regular expression denial of service vulnerability. Remediation is available by upgrading affected packages to version 2.0.2, 1.1.12, 3.0.1, 4.0.1.
CVE-2025-5889 at a Glance
Security Impact
CVSS: 3.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-5889
To remediate this vulnerability, upgrade all affected Brace expansion dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install brace-expansion@2.0.2
npm install brace-expansion@1.1.12
npm install brace-expansion@3.0.1
npm install brace-expansion@4.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls brace-expansion
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-5889, inspect your project dependencies using npm:
npm ls brace-expansion
Analyze the terminal output to locate any version of Brace expansion in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.2), your application is affected.
Note: The npm ls brace-expansion command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Brace expansion, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-5889 Affected Brace expansion Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
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
All 1 versions
3.0.0
|
3.0.1
|
|
brace-expansion
|
npm |
≥ 4.0.0
< 4.0.1
All 1 versions
4.0.0
|
4.0.1
|
References
Frequently Asked Questions
What is CVE-2025-5889?
Which Brace expansion versions are affected?
What version fixes CVE-2025-5889?
Is brace-expansion affected?
What is the CVSS score of CVE-2025-5889?
What CWE is associated with CVE-2025-5889?
How can I check npm dependencies for CVE-2025-5889?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v6h2-p8h4-qcjw",
"modified" : "2025-06-11T20:54:10Z",
"published" : "2025-06-09T21:30:51Z",
"aliases" : [ "CVE-2025-5889" ],
"summary" : "brace-expansion Regular Expression Denial of Service vulnerability",
"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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L"
}, {
"type" : "CVSS_V4",
"score" : "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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.1"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.1.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.1.11"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.1"
} ]
} ],
"versions" : [ "3.0.0" ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.1"
} ]
} ],
"versions" : [ "4.0.0" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-5889"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/pull/65/commits/a5b98a4f30d7813266b221435e1eaaf25a1b0ac5"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/commit/0b6a9781e18e9d2769bb2931f4856d1360243ed2"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/commit/15f9b3c75ebf5988198241fecaebdc45eff28a9f"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/commit/36603d5f3599a37af9e85eda30acd7d28599c36e"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/commit/c3c73c8b088defc70851843be88ccc3af08e7217"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/mmmsssttt404/37a40ce7d6e5ca604858fe30814d9466"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/juliangruber/brace-expansion"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.311660"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.311660"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?submit.585717"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-10T22:51:59Z",
"nvd_published_at" : "2025-06-09T19:15:25Z"
}
}