org.mvnpm:shell-quote@1.8.4

  • latest version

    1.12.0

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    2 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:shell-quote package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Command Injection

    org.mvnpm:shell-quote is a package used to quote and parse shell commands.

    Affected versions of this package are vulnerable to Command Injection via the quote function when a { comment } token is followed by a string token containing a line terminator. A { comment } token emits a #-prefixed string that comments out the rest of the shell line, including the opening quote of any subsequent string token. A line terminator inside that subsequent string ends the comment, causing the remainder of the string to be interpreted as shell input - for example, quote(['echo', { comment: 'x' }, 'a\nid;#']) executes id in sh, bash, zsh, ksh, and dash. Because parse emits a comment token for a mid-word # (such as in a URL fragment), appending tokens to parse output is sufficient to reach the vulnerable code path.

    How to fix Command Injection?

    Upgrade org.mvnpm:shell-quote to version 1.11.0 or higher.

    [1.8.4,1.11.0)
    • H
    Inefficient Algorithmic Complexity

    org.mvnpm:shell-quote is a package used to quote and parse shell commands.

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the parseInternal function of parse.js, where parse() finalizes the token list with Array.prototype.concat inside a reduce, copying the entire growing array on every iteration for O(n²) behavior. An attacker can block the single-threaded Node.js event loop and sustain a denial of service by passing a large space-separated string to any code path that calls parse(), with roughly 128 KB stalling the loop for about 15 seconds and 256 KB for about 57 seconds.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade org.mvnpm:shell-quote to version 1.9.0 or higher.

    [,1.9.0)