CVE-2026-45149: juliangruber brace-expansion resource exhaustion in numeric range expansion

CVE-2026-45149 · Severity: medium · CVSS 6.5 · Published 2026-05-29

The brace-expansion library, a tool used to generate strings based on patterns, contains a flaw that can lead to excessive memory and CPU usage. An attacker can provide a specific pattern that forces the system to perform massive internal calculations even if a limit on the final output size is set. This can cause the application to slow down significantly or crash, leading to a denial-of-service for users.

Technologies: brace-expansion (npm). Vendors: npm.

Quick answers

Is CVE-2026-45149 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45149 being exploited in the wild.
How severe is CVE-2026-45149?
Medium severity, with a CVSS score of 6.5, published 29 May 2026.
Which products and versions are affected?
brace-expansion (npm) >= 5.0.0, < 5.0.6, SEMVER:introduced=5.0.0,fixed=5.0.6.
Is there a fix for CVE-2026-45149?
Yes. brace-expansion (npm): upgrade to 5.0.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45149 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45149?
Check whether you run brace-expansion (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • brace-expansion (npm): upgrade to 5.0.6 or later
    npm install brace-expansion@5.0.6

Technical details

A vulnerability exists in the brace-expansion library (versions 5.0.0 to 5.0.5) due to improper enforcement of the 'max' option. When a large numeric range (e.g., {1..10000000}) is provided, the sequence generation loop creates all intermediate elements in memory before the 'max' limit is applied. This results in significant memory allocation (approx. 505 MB for 10 million elements) and CPU time (approx. 800ms) regardless of the configured output limit. An attacker can exploit this via network-delivered strings to cause a denial-of-service (DoS) through resource exhaustion. The issue is fixed in version 5.0.6.

Affected products

  • juliangruber brace-expansion >=5.0.0 <5.0.6

Identifiers

  • CVE-2026-45149
  • GHSA-jxxr-4gwj-5jf2

Timeline

  • 2026-05-12: advisory: GitHub Security Advisory published
  • 2026-05-29: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.