# CVE-2022-3517: minimatch ReDoS vulnerability in braceExpand

Source: https://junglewise.ai/threats/cve-2022-3517-minimatch-redos-vulnerability-in-braceexpand  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-10-18. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2022-3517 · Severity: low · CVSS 3.1 · Published 2022-10-18

minimatch is a widely-used JavaScript library for wildcard pattern matching in file paths. A Regular Expression Denial of Service (ReDoS) flaw allows attackers to cause service outages by passing specially crafted input to the braceExpand function, which can consume CPU resources and hang applications that depend on the library.

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

## Quick answers

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

**How severe is CVE-2022-3517?** Low severity, with a CVSS score of 3.1, published 18 October 2022.

**Which products and versions are affected?** minimatch (npm) SEMVER:introduced=0,fixed=3.0.5.

**Is there a fix for CVE-2022-3517?** Yes. minimatch (npm): upgrade to 3.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2022-3517?** Check whether you run minimatch (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

- minimatch (npm): upgrade to 3.0.5 or later

  ```sh
  npm install minimatch@3.0.5
  ```


## Technical details

A ReDoS vulnerability exists in the minimatch library due to an unoptimized regex pattern (/\{.*\}/) used in the braceExpand function. An attacker can provide specific malformed input that causes catastrophic backtracking in the regex engine, leading to excessive CPU consumption and denial of service. The vulnerability is triggered when braceExpand is called with adversarial input; no authentication or user interaction is required if the vulnerable function is exposed through a network-facing application. An attacker can exploit this to crash or hang services that process untrusted glob patterns. The vulnerability has been fixed in minimatch version 3.0.5 and later.

## Affected products

- isaacs minimatch before 3.0.5

## Identifiers

- CVE-2022-3517
- GHSA-f8q6-p94x-37v3

## Timeline

- 2022-10-17: disclosed: Published on NVD
- 2022-10: patched: Fixed in version 3.0.5

## References

- [https://github.com/grafana/grafana-image-renderer/issues/329](https://github.com/grafana/grafana-image-renderer/issues/329)

## Related threats

- [minimatch ReDoS in glob pattern compilation](https://junglewise.ai/threats/cve-2026-118764-minimatch-is-a-minimal-matching-utility-for-converting-glob)
- [minimatch ReDoS in matchOne via multiple non-adjacent GLOBSTAR segments](https://junglewise.ai/threats/cve-2026-27903-minimatch-redos-in-matchone-via-multiple-non-adjacent-globstar)
- [minimatch regular expression denial of service](https://junglewise.ai/threats/cve-2016-10540-minimatch-regular-expression-denial-of-service)
