Skip to main content

brace-expansion CVE-2026-45149

| EUVDEUVD-2026-33442 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-05-18 https://github.com/juliangruber/brace-expansion GHSA-jxxr-4gwj-5jf2
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft string with oversized brace range
  2. Delivery
    Send input to vulnerable endpoint
  3. Exploit
    Function begins expansion
  4. Execution
    Loop builds full intermediate array ignoring max
  5. Persist
    Excessive memory/time consumption
  6. Impact
    Service hang or crash

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Untrusted input must be passed directly to the expand() function of brace-expansion@5.0.0-5.0.5 when a numeric max option is provided. Exploitation does not require authentication or user interaction, but remote attack is possible only if the application exposes such input over a network. The DoS is limited to availability; no data confidentiality or integrity loss occurs.

Impact

The CVSS v3.1 score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) indicates an easily exploitable network vulnerability leading to high availability impact. However, EPSS is only 0.03% (11th percentile), suggesting very low real-world exploitation likelihood. The fix commit includes a test demonstrating the DoS, so a proof of concept exists but no weaponized exploit or active exploitation (not listed in CISA KEV). SSVC assessment would favour low urgency given the low EPSS and absence of active attacks. The library's impact depends on how applications consume untrusted input for expansion; default configurations often don't expose a max option directly, but custom server‑side code using it could be vulnerable.

Exploit ScenarioDerived

An attacker sends a crafted HTTP request to a web application that uses brace-expansion internally, supplying a string like {1..100000000}. The application calls expand() with a max option set, but the library still allocates ~505 MB of memory, exhausting server resources and causing the service to crash or become unresponsive. The test case in the advisory serves as a public proof of concept.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 27, 2026

Denial of service in brace-expansion versions 5.0.0 through 5.0.5 allows remote attackers to cause excessive resource consumption. When an application passes untrusted input to the expand function with a numeric max limit, a crafted string containing a single large numeric range (e.g., {1..10000000}) triggers allocation of a massive intermediate array before the limit is applied, leading to memory exhaustion and service disruption. No active exploitation has been reported, and the low EPSS score (0.03%) indicates a low probability of widespread attacks.

RemediationAI

Upgrade to brace-expansion version 5.0.6 or later, available via npm (npm update brace-expansion@5.0.6). The patch commit (https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5) adds the max check inside the expansion loop, preventing excessive allocations. As a temporary workaround, sanitise user input to remove large numeric brace ranges before calling the library, or restrict the maximum range size at the application level. Note that this workaround may break legitimate brace expansion patterns; thorough input validation is required.

Affected VersionsENISA

brace-expansion 5.0.0, < 5.0.6

Affected Packages

npm brace-expansion fix: 5.0.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

brace-expansion is an npm library that implements brace expansion (like {1..5} → 1 2 3 4 5) commonly used in shells and build tools. The root cause is CWE-400 Uncontrolled Resource Consumption: the sequence generation loop allocates all intermediate elements regardless of the max option, only capping the output array at the end. The affected code is in the expand_ function in src/index.ts. The package is identified by CPE pkg:npm/brace-expansion.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Network-accessible via crafted input; no auth needed; memory exhaustion causes DoS

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

5
Analysis Updated
Jun 12, 2026 - 18:58 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 12, 2026 - 18:58 vuln.today
v2 - CVSS changed
Severity Changed
Jun 12, 2026 - 18:52 NVD
MEDIUM HIGH
CVSS changed
Jun 12, 2026 - 18:52 NVD
6.5 (MEDIUM) 7.5 (HIGH)
CVE Published
May 18, 2026 - 16:22 nvd
HIGH 7.5

DescriptionNVD

The max option was being applied too late:

When 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.

Workaround

Ensure the string to be expanded doesn't contain more values than the desired max item count.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Prevalence
Low
brace-expansion 5.x is a relatively new major release; most projects still use 2.x or 4.x
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy