CVE-2026-45149: brace-expansion Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-jxxr-4gwj-5jf2
CVSS 6.5
CWE-400
Published
Advisory Summary

CVE-2026-45149 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting brace-expansion libraries in the npm ecosystem. The issue involves large numeric range defeats documented `max` dos protection. Remediation is available by upgrading affected packages to version 5.0.6.

CVE-2026-45149 at a Glance

CVE Identifier CVE-2026-45149
GHSA Identifier GHSA-jxxr-4gwj-5jf2
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product brace-expansion
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-45149

To remediate this vulnerability, upgrade all affected 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.

brace-expansion fixed: 5.0.6
npm install brace-expansion@5.0.6
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 brace-expansion

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45149, inspect your project dependencies using npm:

npm ls brace-expansion

Analyze the terminal output to locate any version of 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.6), your application is affected.

Note: The npm ls 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In 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

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.

CVE-2026-45149 Affected brace-expansion Versions

1 component(s)
Fixed Versions:
5.0.6
Product / Package Ecosystem Affected Versions Fixed Version
brace-expansion
npm
≥ 5.0.0
< 5.0.6
5.0.6

References

Frequently Asked Questions

What is CVE-2026-45149?
CVE-2026-45149 is a security vulnerability in brace-expansion involving Large numeric range defeats documented `max` DoS protection under CWE-400: Uncontrolled Resource Consumption.
Which brace-expansion versions are affected?
Affected versions include releases prior to 5.0.6 across affected packages: brace-expansion.
What version fixes CVE-2026-45149?
Upgrading to 5.0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is brace-expansion affected?
Yes, brace-expansion is affected in releases prior to 5.0.6. Upgrade your dependency to 5.0.6 or later.
What is the CVSS score of CVE-2026-45149?
CVE-2026-45149 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-45149?
CVE-2026-45149 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-45149?
Run the dependency tree command: 'npm ls 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-jxxr-4gwj-5jf2",
  "modified" : "2026-06-09T10:32:28Z",
  "published" : "2026-05-18T16:22:01Z",
  "aliases" : [ "CVE-2026-45149" ],
  "summary" : "brace-expansion: Large numeric range defeats documented `max` DoS protection",
  "details" : "The `max` option was being applied too late:\n\nWhen 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.\n\n### Workaround\n\nEnsure the string to be expanded doesn't contain more values than the desired `max` item count.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "brace-expansion"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-jxxr-4gwj-5jf2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45149"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juliangruber/brace-expansion"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-18T16:22:01Z",
    "nvd_published_at" : "2026-05-29T20:16:25Z"
  }
}