CVE-2026-25547: @isaacs/brace expansion Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-7h2j-956f-4vf2
CWE-1333
Published
Advisory Summary

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

CVE-2026-25547 at a Glance

CVE Identifier CVE-2026-25547
GHSA Identifier GHSA-7h2j-956f-4vf2
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product @isaacs/brace expansion
Package Ecosystem npm
Published Date
Last Updated

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.

@isaacs/brace-expansion fixed: 5.0.1
npm install @isaacs/brace-expansion@5.0.1
Verify Direct and Transitive Dependencies

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

### 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`: ```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: ```bash 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

CVE-2026-25547 Affected @isaacs/brace expansion Versions

1 component(s)
Fixed Versions:
5.0.1
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?
CVE-2026-25547 is a security vulnerability in @isaacs/brace expansion involving @isaacs/brace-expansion has Uncontrolled Resource Consumption under CWE-1333: Inefficient Regular Expression Complexity.
Which @isaacs/brace expansion versions are affected?
Affected versions include releases prior to 5.0.1 across affected packages: @isaacs/brace-expansion.
What version fixes CVE-2026-25547?
Upgrading to 5.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @isaacs/brace-expansion affected?
Yes, @isaacs/brace-expansion is affected in releases prior to 5.0.1. Upgrade your dependency to 5.0.1 or later.
What CWE is associated with CVE-2026-25547?
CVE-2026-25547 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2026-25547?
Run the dependency tree command: 'npm ls @isaacs/brace-expansion'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}