CVE-2026-45149: brace-expansion Denial of Service Vulnerability
MODERATECVE-2026-45149 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting brace-expansion libraries in the npm ecosystem. The issue involves large numeric range defeats documented `max` dos protection. Remediation is available by upgrading affected packages to version 5.0.6.
CVE-2026-45149 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-45149
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@5.0.6
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-2026-45149, 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 5.0.6), 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-2026-45149 Affected brace-expansion Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
brace-expansion
|
npm |
≥ 5.0.0
< 5.0.6
|
5.0.6
|
References
Frequently Asked Questions
What is CVE-2026-45149?
Which brace-expansion versions are affected?
What version fixes CVE-2026-45149?
Is brace-expansion affected?
What is the CVSS score of CVE-2026-45149?
What CWE is associated with CVE-2026-45149?
How can I check npm dependencies for CVE-2026-45149?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jxxr-4gwj-5jf2",
"modified" : "2026-06-09T10:32:28Z",
"published" : "2026-05-18T16:22:01Z",
"aliases" : [ "CVE-2026-45149" ],
"summary" : "brace-expansion: Large numeric range defeats documented `max` DoS protection",
"details" : "The `max` option was being applied too late:\n\nWhen expanding a single large numeric range like `{1..10000000}`, the sequence generation loop generates all 10 million intermediate elements before the `max` limit is applied With `max=10`, the output is correctly limited to 10 items, but the process still allocates `~505 MB` and spends `~800ms` building the full intermediate array.\n\n### Workaround\n\nEnsure the string to be expanded doesn't contain more values than the desired `max` item count.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-jxxr-4gwj-5jf2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45149"
}, {
"type" : "WEB",
"url" : "https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/juliangruber/brace-expansion"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T16:22:01Z",
"nvd_published_at" : "2026-05-29T20:16:25Z"
}
}