# CVE-2017-18077: brace-expansion regular expression denial of service

Source: https://junglewise.ai/threats/cve-2017-18077-brace-expansion-regular-expression-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-01-29. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-18077 · Severity: low · CVSS 3 · Published 2018-01-29

brace-expansion is a popular Node.js library that expands strings with brace patterns (e.g., converting "{a,b,c}" into "a b c"). The library contains a regular expression vulnerability that allows an attacker to cause a denial of service by providing a specially crafted input string, consuming excessive CPU and freezing applications that use the library. This impacts any Node.js application or tool that depends on brace-expansion.

Technologies: [brace-expansion (npm)](https://junglewise.ai/threats/technologies/brace-expansion). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

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

**How severe is CVE-2017-18077?** Low severity, with a CVSS score of 3, published 29 January 2018.

**Which products and versions are affected?** brace-expansion (npm) SEMVER:introduced=0,fixed=1.1.7.

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

**How is CVE-2017-18077 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-18077?** 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 1.1.7 or later

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


## Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS) condition in the brace-expansion library's pattern matching logic. The vulnerable regular expression exhibits catastrophic backtracking when processing malformed input strings with many consecutive commas and newlines. The attack is triggered remotely through untrusted input to the expand() function with no authentication required. An attacker can cause the affected process to hang indefinitely, achieving a denial of service condition. The vulnerability was fixed in version 1.1.7 via improved regex pattern handling.

## Affected products

- Julian Gruber brace-expansion before 1.1.7

## Identifiers

- CVE-2017-18077
- GHSA-832h-xg76-4gv6

## Timeline

- 2017-03-02: disclosed
- 2018-01-29: patched

## References

- [https://github.com/juliangruber/brace-expansion/issues/33](https://github.com/juliangruber/brace-expansion/issues/33)

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