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

Source: https://junglewise.ai/threats/cve-2026-14257-juliangruber-brace-expansion-denial-of-service-via-memory  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-23. Updated: 2026-07-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/brace-expansion). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://api.github.com/users/bnbdr](https://api.github.com/users/bnbdr)
- [https://github.com/bnbdr](https://github.com/bnbdr)
- [https://api.github.com/users/bnbdr/gists%7B/gist_id%7D](https://api.github.com/users/bnbdr/gists%7B/gist_id%7D)
- [https://api.github.com/users/bnbdr/repos](https://api.github.com/users/bnbdr/repos)
- [https://avatars.githubusercontent.com/u/24456233?v=4](https://avatars.githubusercontent.com/u/24456233?v=4)
- [https://api.github.com/users/bnbdr/events%7B/privacy%7D](https://api.github.com/users/bnbdr/events%7B/privacy%7D)

## Related threats

- [brace-expansion stack exhaustion in deeply nested brace groups](https://junglewise.ai/threats/cve-2026-102278-the-brace-expansion-library-generates-arbitrary-strings)
- [brace-expansion quadratic CPU consumption denial of service](https://junglewise.ai/threats/cve-2026-102277-the-brace-expansion-library-generates-arbitrary-strings)
- [brace-expansion stack exhaustion denial of service](https://junglewise.ai/threats/cve-2026-102276-the-brace-expansion-library-generates-arbitrary-strings)
- [juliangruber brace-expansion Denial of Service via unbounded arrays](https://junglewise.ai/threats/cve-2026-69152-juliangruber-brace-expansion-denial-of-service-via-unbounded)
- [juliangruber brace-expansion denial of service in expand function](https://junglewise.ai/threats/cve-2026-13149-juliangruber-brace-expansion-denial-of-service-in-expand-function)
