CVE-2026-14257: juliangruber brace-expansion denial of service via memory exhaustion

CVE-2026-14257 · Severity: high · CVSS 7.5 · Published 2026-07-23

The brace-expansion library, a popular tool for expanding shell-like brace patterns in Node.js, is vulnerable to a denial-of-service attack. An attacker can provide a specially crafted, small string that causes the application to consume all available memory and crash. This crash is uncatchable and will take down the entire application process, leading to a service outage.

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

Quick answers

Is CVE-2026-14257 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-14257 being exploited in the wild.
How severe is CVE-2026-14257?
High severity, with a CVSS score of 7.5, published 23 July 2026.
Which products and versions are affected?
brace-expansion (npm) <= 5.0.7, SEMVER:introduced=4.0.0,fixed=5.0.8.
Is there a fix for CVE-2026-14257?
Yes. brace-expansion (npm): upgrade to 5.0.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-14257 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-14257?
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.8 or later
    npm install brace-expansion@5.0.8

Technical details

The `expand()` function in `brace-expansion` versions up to 5.0.7 fails to limit the total length of expanded strings, even though it limits the number of results. By chaining many brace groups (e.g., `'{a,b}'.repeat(1500)`), an attacker can force the library to create a massive number of intermediate 'cons-strings' (ropes) in the V8 engine. This leads to a fatal, uncatchable out-of-memory (OOM) error that terminates the Node.js process. The vulnerability can be triggered remotely if the application passes untrusted input to `expand()` or transitively via libraries like `minimatch` or `glob`. A fix is available in version 5.0.8 which introduces a `maxLength` option to bound total expansion size.

Affected products

  • juliangruber brace-expansion <= 5.0.7

Identifiers

  • CVE-2026-14257
  • GHSA-mh99-v99m-4gvg

Timeline

  • 2026-07-23: disclosed
  • 2026-07-23: advisory: NVD publication date
  • 2026-07-24: patched: GitHub Advisory reviewed and updated

References

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