Vulnerabilities in pkg:npm/@isaacs/brace-expansion
PACKAGECVE-2026-25547 is a HIGH remote code execution vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting @isaacs/brace expansion libraries in the npm ecosystem. The issue involves @isaacs/brace-expansion has uncontrolled resource consumption. Remediation is available by upgrading affected packages to version 5.0.1.
pkg:npm/@isaacs/brace-expansion
Vulnerability advisories affecting package pkg:npm/@isaacs/brace-expansion. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7h2j-956f-4vf2 | CVE-2026-25547 | HIGH | @isaacs/brace-expansion has Uncontrolled Resource Consumption |
CVE-2026-25547 at a Glance
How to Fix CVE-2026-25547
To remediate this vulnerability, upgrade all affected @isaacs/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 @isaacs/brace-expansion@5.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @isaacs/brace-expansion
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-25547, inspect your project dependencies using npm:
npm ls @isaacs/brace-expansion
Analyze the terminal output to locate any version of @isaacs/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.1), your application is affected.
Note: The npm ls @isaacs/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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In @isaacs/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-25547 Affected @isaacs/brace expansion Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@isaacs/brace-expansion
|
npm |
< 5.0.1
|
5.0.1
|
References
Frequently Asked Questions
What is CVE-2026-25547?
Which @isaacs/brace expansion versions are affected?
What version fixes CVE-2026-25547?
Is @isaacs/brace-expansion affected?
What CWE is associated with CVE-2026-25547?
How can I check npm dependencies for CVE-2026-25547?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7h2j-956f-4vf2",
"modified" : "2026-02-05T00:36:54Z",
"published" : "2026-02-03T19:41:15Z",
"aliases" : [ "CVE-2026-25547" ],
"summary" : "@isaacs/brace-expansion has Uncontrolled Resource Consumption",
"details" : "### Summary\n\n`@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.\n\n### Details\n\nThe 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.\n\nFor example, the following input:\n\n```\n{0..99}{0..99}{0..99}{0..99}{0..99}\n```\n\nproduces:\n\n```\n100^5 = 10,000,000,000 combinations\n```\n\nThis exponential growth can quickly overwhelm the event loop and heap memory, resulting in process termination.\n\n### Proof of Concept\n\nThe following script reliably triggers the issue.\n\nCreate `poc.js`:\n\n```js\nconst { expand } = require('@isaacs/brace-expansion');\n\nconst pattern = '{0..99}{0..99}{0..99}{0..99}{0..99}';\n\nconsole.log('Starting expansion...');\nexpand(pattern);\n```\n\nRun it:\n\n```bash\nnode poc.js\n```\n\nThe process will freeze and typically crash with an error such as:\n\n```\nFATAL ERROR: JavaScript heap out of memory\n```\n\n### Impact\n\nThis 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.\n\nAn attacker does not require authentication and can use a very small payload to:\n\n* Trigger exponential computation\n* Exhaust memory and CPU resources\n* Block the event loop\n* Crash Node.js services relying on this library",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@isaacs/brace-expansion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/isaacs/brace-expansion/security/advisories/GHSA-7h2j-956f-4vf2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25547"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/isaacs/brace-expansion"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-03T19:41:15Z",
"nvd_published_at" : "2026-02-04T22:16:00Z"
}
}