CVE-2016-10540 Regular Expression Denial of Service in minimatch

High 7.5 Published Updated

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.

Weakness: CWE-20, CWE-400

Which versions are affected by CVE-2016-10540?

2 open source packages ship an affected version, including minimatch. It affects 1 product.

PackageAffectedFixed in
minimatch npmAll versions3.0.2
minimatch npmAll versions3.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.

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.

Is CVE-2016-10540 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free