brace-expansion DoS via unbounded expansion length causing an out-of-memory process crash
Summary
| CVE | CVE-2026-14257 |
|---|---|
| State | PUBLISHED |
| Assigner | seal |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-07-23 14:17:00 UTC |
| Updated | 2026-07-23 15:48:25 UTC |
| Description | brace-expansion through 5.0.7 is vulnerable to denial of service via memory exhaustion. The expand() function limits the number of results with a max option (default 100,000) but does not bound the length of each result string. By chaining multiple brace groups, an attacker keeps the result count under the limit while making each result progressively longer, so total memory scales with both count and string length until the process hits a fatal, uncatchable out-of-memory error. About 7.5 KB of input ('{a,b}'.repeat(1500)) crashes a default Node.js process. Any application that passes attacker-influenced strings to brace-expansion.expand() - directly or transitively via minimatch / glob brace patterns - can be crashed by a small request. Fixed in 5.0.8 by adding a maxLength option (default 4,000,000) that bounds accumulated output and intermediate arrays. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from 22e2d327-25fe-45d7-9f0c-dcd23b7108df
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Problem Types: CWE-400 | CWE-770 | CWE-400 CWE-400 Uncontrolled Resource Consumption | CWE-770 CWE-770 Allocation of Resources Without Limits or Throttling
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | 22e2d327-25fe-45d7-9f0c-dcd23b7108df | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | CNA | CVSS | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Juliangruber | Brace-expansion | affected 5.0.7 semver | Linux, macOS, Windows |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/juliangruber/brace-expansion/commit/a1bd33999ea75262c4749fff3... | 22e2d327-25fe-45d7-9f0c-dcd23b7108df | github.com | |
| www.npmjs.com/package/brace-expansion | 22e2d327-25fe-45d7-9f0c-dcd23b7108df | www.npmjs.com | |
| github.com/juliangruber/brace-expansion | 22e2d327-25fe-45d7-9f0c-dcd23b7108df | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: bnbdr (en)
There are currently no legacy QID mappings associated with this CVE.