CVE-2016-10540 Regular Expression Denial of Service in minimatch
Attackers can cause denial of service in applications using Minimatch by supplying malicious glob patterns that trigger excessive CPU consumption.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2016-10540?
CVE-2016-10540 is a high-severity denial of service vulnerability in HackerOne minimatch node module, published on 31 May 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Minimatch is a minimal matching utility that works by converting glob expressions into JavaScript `RegExp` objects. The primary function, `minimatch(path, pattern)` in Minimatch 3.0.1 and earlier is vulnerable to ReDoS in the `pattern` parameter.
Which versions are affected by CVE-2016-10540?
2 open source packages ship an affected version, including minimatch. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
minimatch npm | All versions | 3.0.2 |
minimatch npm | All versions | 3.0.2 |
Products include Minimatch Project Minimatch.
How do I fix CVE-2016-10540?
Upgrade minimatch to 3.0.2 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2016-10540 being exploited?
There is no known exploitation of CVE-2016-10540 in the wild and no public exploit code.
Other vulnerabilities in HackerOne minimatch node module
- CVE-2026-26996 minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern
- CVE-2026-27903 minimatch has a ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments
- CVE-2026-27904 minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions
Sources
Also known as AZL-44502, CLSA-2026-1773620219, CLSA-2026-1774484506, CLSA-2026-1777250299, CVE-2016-1000023, DEBIAN-CVE-2016-10540 and 3 more.