9.2critical
Uncontrolled Resource Consumption in @isaacs/brace-expansion
- Severity
- 9.2critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.54% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7h2j-956f-4vf2
Description
@isaacs/brace-expansion is a hybrid CJS/ESM TypeScript fork of brace-expansion. Prior to version 5.0.1, @isaacs/brace-expansion is vulnerable to a denial of service (DoS) issue caused by unbounded brace range expansion. When an attacker provides a pattern containing repeated numeric brace ranges, the library attempts to eagerly generate every possible combination synchronously. Because the expansion grows exponentially, even a small input can consume excessive CPU and memory and may crash the Node.js process. This issue has been patched in version 5.0.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| isaacs brace-expansion | < 5.0.1 | CVE List |
| @isaacs/brace-expansion (npm) | before 5.0.1 | GitHub Advisory Database |
All scores
| GitHub_M | 9.2critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
@isaacs/brace-expansion is a hybrid CJS/ESM TypeScript fork of brace-expansion. Prior to version 5.0.1, @isaacs/brace-expansion is vulnerable to a denial of service (DoS) issue caused by unbounded brace range expansion. When an attacker provides a pattern containing repeated numeric brace ranges, the library attempts to eagerly generate every possible combination synchronously. Because the expansion grows exponentially, even a small input can consume excessive CPU and memory and may crash the Node.js process. This issue has been patched in version 5.0.1.
GitHub Advisory Database
Summary
@isaacs/brace-expansion is vulnerable to a Denial of Service (DoS) issue caused by unbounded brace range expansion. When an attacker provides a pattern containing repeated numeric brace ranges, the library attempts to eagerly generate every possible combination synchronously. Because the expansion grows exponentially, even a small input can consume excessive CPU and memory and may crash the Node.js process.
Details
The vulnerability occurs because @isaacs/brace-expansion expands brace expressions without any upper bound or complexity limit. Expansion is performed eagerly and synchronously, meaning the full result set is generated before returning control to the caller.
For example, the following input:
{0..99}{0..99}{0..99}{0..99}{0..99}
produces:
100^5 = 10,000,000,000 combinations
This exponential growth can quickly overwhelm the event loop and heap memory, resulting in process termination.
Proof of Concept
The following script reliably triggers the issue.
Create poc.js:
const { expand } = require('@isaacs/brace-expansion');
const pattern = '{0..99}{0..99}{0..99}{0..99}{0..99}';
console.log('Starting expansion...');
expand(pattern);
Run it:
node poc.js
The process will freeze and typically crash with an error such as:
FATAL ERROR: JavaScript heap out of memory
Impact
This is a denial of service vulnerability. Any application or downstream dependency that uses @isaacs/brace-expansion on untrusted input may be vulnerable to a single-request crash.
An attacker does not require authentication and can use a very small payload to:
- Trigger exponential computation
- Exhaust memory and CPU resources
- Block the event loop
- Crash Node.js services relying on this library
NVD (es)
@isaacs/brace-expansion es una bifurcación de TypeScript híbrida CJS/ESM de brace-expansion. Antes de la versión 5.0.1, @isaacs/brace-expansion es vulnerable a un problema de denegación de servicio (DoS) causado por la expansión ilimitada de rangos de llaves. Cuando un atacante proporciona un patrón que contiene rangos de llaves numéricos repetidos, la librería intenta generar ávidamente cada combinación posible de forma síncrona. Debido a que la expansión crece exponencialmente, incluso una entrada pequeña puede consumir CPU y memoria excesivas y puede bloquear el proceso de Node.js. Este problema ha sido parcheado en la versión 5.0.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25547 changed 2026-02-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7h2j-956f-4vf2 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-25547 changed 2026-06-17 | Public domain |