org.mvnpm:cross-spawn@7.0.2

  • latest version

    7.0.6

  • first published

    2 years ago

  • latest version published

    1 years ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:cross-spawn 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

    Affected versions of this package are vulnerable to Command Injection via insufficient escaping in lib/util/escape.js when spawning batch files on Windows. When a batch file outside node_modules/.bin forwards its arguments (e.g. with %*), cmd.exe parses them a second time, and an attacker-controlled argument can break out of its quotes to execute arbitrary commands through npm.cmd, globally installed package shims, or user batch files. Additionally, batch file detection can be bypassed with trailing dots or spaces in the command name, %VAR% in an argument can be expanded if an environment variable named VAR^ exists, and !VAR! can be expanded when delayed expansion is enabled in the registry.

    Note: This is only exploitable on Windows when untrusted input is passed as arguments to a command that runs through cmd.exe; other platforms and options.shell mode are not affected.

    How to fix Command Injection?

    A fix was pushed into the master branch but not yet published.

    [0,)
    • C
    Command Injection

    Affected versions of this package are vulnerable to Command Injection via the batch-file detection logic in lib/parse.js on Windows, when a command passed to spawn or spawnSync is not written as a plain program name or path. Commands containing double quotes, command-name delimiters (space, tab, ,, ;, =), trailing whitespace, or a child-specific PATHEXT can cause cross-spawn to miss that cmd.exe will resolve the target to a batch file. The arguments are then escaped as though the target were a regular executable rather than a batch file, so command metacharacters in an untrusted argument (for example "&calc) are interpreted by cmd.exe and execute arbitrary commands.

    Note: This is only exploitable when the application passes a command in one of the affected forms (quoted, containing delimiters, with trailing whitespace, or with a custom PATHEXT) and passes untrusted input as arguments on Windows.

    How to fix Command Injection?

    A fix was pushed into the master branch but not yet published.

    [0,)
    • H
    Regular Expression Denial of Service (ReDoS)

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade org.mvnpm:cross-spawn to version 6.0.6, 7.0.5 or higher.

    [,6.0.6)[7.0.0,7.0.5)