# CVE-2026-102278: brace-expansion stack exhaustion in deeply nested brace groups

Source: https://junglewise.ai/threats/cve-2026-102278-the-brace-expansion-library-generates-arbitrary-strings  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-28. Updated: 2026-09-28  
License: CC BY 4.0 with a link back

CVE-2026-102278 · Severity: high · CVSS 7.5 · Published 2026-09-28

The brace-expansion library is a Node.js utility that parses and expands shell-style brace patterns (like {a,b,c}). An attacker who can supply deeply nested brace patterns to the expand function can trigger uncontrolled recursion that exhausts the process stack, causing the Node.js application to crash—a denial-of-service attack that requires only about 6KB of malicious input.

Technologies: [Juliangruber Brace-Expansion](https://junglewise.ai/threats/technologies/juliangruber-brace-expansion), [brace-expansion (npm)](https://junglewise.ai/threats/technologies/brace-expansion). Vendors: [Juliangruber](https://junglewise.ai/threats/vendors/juliangruber), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-102278 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-102278 being exploited in the wild.

**How severe is CVE-2026-102278?** High severity, with a CVSS score of 7.5, published 28 September 2026.

**Which products and versions are affected?** Juliangruber Brace-Expansion before 1.1.20, 2.1.6, 3.0.8, and 5.0.11; brace-expansion (npm) SEMVER:introduced=4.0.0,fixed=5.0.11.

**Is there a fix for CVE-2026-102278?** Yes. brace-expansion (npm): upgrade to 5.0.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-102278 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-102278?** Check whether you run Juliangruber Brace-Expansion or 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.11 or later

  ```sh
  npm install brace-expansion@5.0.11
  ```


## Technical details

The expand_() function recursively processes brace groups during comma-member expansion and single-set re-wrapping, with one recursion per nesting level. Deeply nested patterns like '{'.repeat(3200) + 'a,b' + '}'.repeat(3200) cause stack exhaustion before existing max or maxLength output limits trigger. The fix introduces a maxDepth bound (default 1000) to limit recursion depth and treat over-nested groups as literal text.

## Affected products

- juliangruber brace-expansion before 1.1.20, 2.1.6, 3.0.8, and 5.0.11

## Identifiers

- CVE-2026-102278
- GHSA-qhr7-859c-m2p7

## Timeline

- 2026-09-28: disclosed
- 2026-09-14: patched

## References

- [https://github.com/juliangruber/brace-expansion/commit/1efee7c397c191da6287a78ec19512476a966a7b](https://github.com/juliangruber/brace-expansion/commit/1efee7c397c191da6287a78ec19512476a966a7b)
- [https://github.com/juliangruber/brace-expansion/commit/935d78f32f335b2ff76578e5c5e877d31ae9888c](https://github.com/juliangruber/brace-expansion/commit/935d78f32f335b2ff76578e5c5e877d31ae9888c)

## Related threats

- [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 via memory exhaustion](https://junglewise.ai/threats/cve-2026-14257-juliangruber-brace-expansion-denial-of-service-via-memory)
- [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)
