brace-expansion DoS via unbounded expansion length causing an out-of-memory process crash

Summary

CVECVE-2026-14257
StatePUBLISHED
Assignerseal
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-23 14:17:00 UTC
Updated2026-07-23 15:48:25 UTC
Descriptionbrace-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


VersionSourceTypeScoreSeverityVector
3.122e2d327-25fe-45d7-9f0c-dcd23b7108dfSecondary7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
3.1CNACVSS7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Juliangruber Brace-expansion affected 5.0.7 semver Linux, macOS, Windows

References

ReferenceSourceLinkTags
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)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report