Skip to content
OpenAdvisories

Weakness (CWE)

CWE-77: Command Injection

Class Draft Improper Neutralization of Special Elements used in a Command

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

More detail

Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks.

How to prevent it (5 mitigations)
  1. Architecture and Design

    If at all possible, use library calls rather than external processes to recreate the desired functionality.

  2. Implementation

    If possible, ensure that all external commands called from the program are statically created.

  3. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  4. Operation

    Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.

  5. System Configuration

    Assign permissions that prevent the user from accessing/opening privileged files.

Source: MITRE CWE-77

818 results · Clear filters · Feed

  • Critical 9.8
    CVE-2022-2143 Public exploit EPSS 63%

    Advantech iView

    The affected product is vulnerable to two instances of command injection, which may allow an attacker to remotely execute arbitrary code.

  • Critical 10.0
    CVE-2022-31161 Public exploit Scanner template EPSS 29%

    Roxy-WI Vulnerable to Unauthenticated Remote Code Execution via ssl_cert Upload

    Roxy-WI is a Web interface for managing HAProxy, Nginx and Keepalived servers. Prior to version 6.1.1.0, the system command can be run remotely via the subprocess_execute function without processing the inputs received from the user in the /app/options.py fil…

  • Critical 9.8

    Commandline class shell injection vulnerabilities

    In Apache Maven maven-shared-utils prior to version 3.3.3, the Commandline class can emit double-quoted strings without proper escaping, allowing shell injection attacks.

  • Critical 9.9
    CVE-2022-26085 EPSS 13%

    An OS command injection vulnerability exists in the httpd wlscan_ASP functionality of InHand Networks InRouter302 V3.5.…

  • Critical 9.9

    An OS command injection vulnerability exists in the daretools binary functionality of InHand Networks InRouter302 V3.5.…

  • Critical 9.1

    An OS command injection vulnerability exists in the console factory functionality of InHand Networks InRouter302 V3.5.4…

  • Critical 9.8

    Vulnerability in QVR

    We have already fixed this vulnerability in the following versions of QVR: QVR 5.1.6 build 20220401 and later

  • Critical 9.8

    Command Injection

    The package git-pull-or-clone before 2.0.2 are vulnerable to Command Injection due to the use of the --upload-pack feature of git which is also supported for git clone. The source includes the use of the secure child process API spawn(). However, the outpath …

  • Critical 9.9

    Command Injection Vulnerability in hestiacp/hestiacp

    Command Injection Vulnerability in GitHub repository hestiacp/hestiacp prior to 1.5.12. An authenticated remote attacker with low privileges can execute arbitrary code under root context.

  • Critical 9.8

    Command injection in npm-dependency-versions

    The npm-dependency-versions package through 0.3.0 for Node.js allows command injection if an attacker is able to call dependencyVersions with a JSON object in which pkgs is a key, and there are shell metacharacters in a value.

  • Critical 10.0

    MDT AutoSave Command Injection

    An attacker could leverage an API to pass along a malicious file that could then manipulate the process creation command line in MDT AutoSave versions prior to v6.02.06 and run a command line argument. This could then be leveraged to run a malicious process.

  • Critical 9.8
    CVE-2022-26265 Public exploit EPSS 30%

    Remote Code Execution in Contao Managed Edition

    Contao Managed Edition v1.5.0 was discovered to contain a remote command execution (RCE) vulnerability via the component php_cli parameter.

  • Critical 9.8
    CVE-2021-4045 Public exploit EPSS 72%

    TP-LINK Tapo C200 remote code execution vulnerability

    TP-Link Tapo C200 IP camera, on its 1.1.15 firmware version and below, is affected by an unauthenticated RCE vulnerability, present in the uhttpd binary running by default as root. The exploitation of this vulnerability allows an attacker to take full control…

  • Critical 9.8

    Command Injection in node-windows

    lib/cmd.js in the node-windows package before 1.0.0-beta.6 for Node.js allows command injection via the PID parameter.

  • Critical 10.0

    Mesa Labs AmegaView command injection

    Mesa Labs AmegaView version 3.0 is vulnerable to a command injection, which may allow an attacker to remotely execute arbitrary code.

  • Critical 9.9

    Mesa Labs AmegaView Command Injection

    Mesa Labs AmegaView Versions 3.0 and prior has a command injection vulnerability that can be exploited to execute commands in the web server.

  • Critical 9.8

    Command injection in itext7-core

    iTextPDF in iText 7 and up to (excluding 4.4.13.3) 7.1.17 allows command injection via a CompareTool filename that is mishandled on the gs (aka Ghostscript) command line in GhostscriptHelper.java.

  • Critical 9.8

    Vulnerability in singleCrunch function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the singleCrunch function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Vulnerability in remove function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the remove function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Vulnerability in crunch function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the crunch function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Vulnerability in dump function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the dump function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Vulnerability in packageCmd function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the packageCmd function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Vulnerability in list function leads to arbitrary code execution via filePath parameters

    An issue was discovered in the list function in shenzhim aaptjs 1.3.1, allows attackers to execute arbitrary code via the filePath parameters.

  • Critical 9.8

    Improper Neutralization of Special Elements used in a Command in Shell-quote

    The shell-quote package before 1.7.3 for Node.js allows command injection. An attacker can inject unescaped shell metacharacters through a regex designed to support Windows drive letters. If the output of this package is passed to a real shell as a quoted arg…

  • Critical 9.8

    bash command injection in spark interpreter

    bash command injection vulnerability in Apache Zeppelin allows an attacker to inject system commands into Spark interpreter settings. This issue affects Apache Zeppelin Apache Zeppelin version 0.9.0 and prior versions.

  • Critical 9.1

    Magento Commerce Improper Neutralization of Special Elements Used In A Command

    Magento Commerce versions 2.4.2 (and earlier), 2.4.2-p1 (and earlier) and 2.3.7 (and earlier) are affected by an Improper Neutralization of Special Elements Used In A Command via the Data collection endpoint. An attacker with admin privileges can upload a spe…

  • Critical 9.8

    Command Injection in Simiki

    Command Injection in Simiki v1.6.2.1 and prior allows remote attackers to execute arbitrary system commands via line 64 of the component 'simiki/blob/master/simiki/config.py'.

  • Critical 9.8

    QSAN XEVO, SANOS - Command Injection -1

    Command injection vulnerability in QSAN XEVO, SANOS allows remote unauthenticated attackers to execute arbitrary commands. Suggest contacting with QSAN and refer to recommendations in QSAN Document.

  • Critical 9.9

    Improper neutralization of special elements used in a command ('Command Injection') vulnerability in task management co…

  • Critical 9.8

    Command Injection in @ronomon/opened

    The @ronomon/opened library before 1.5.2 is vulnerable to a command injection vulnerability which would allow a remote attacker to execute commands on the system if the library was used with untrusted input.

  • Critical 9.8

    Command injection in LocalStack

    The dashboard component of StackLift LocalStack 0.12.6 allows attackers to inject arbitrary shell commands via the functionName parameter.

  • Critical 9.8

    Code injection in @rkesters/gnuplot

    The gnuplot package prior to version 0.1.0 for Node.js allows code execution via shell metacharacters in Gnuplot commands.

  • Critical 9.8

    Arbitrary Command Injection

    This affects all versions of package ffmpegdotjs. If attacker-controlled user input is given to the trimvideo function, it is possible for an attacker to execute arbitrary commands. This is due to use of the child_process exec function without input sanitizat…

  • Critical 9.8

    Arbitrary Command Injection

    This affects all versions of package onion-oled-js. If attacker-controlled user input is given to the scroll function, it is possible for an attacker to execute arbitrary commands. This is due to use of the child_process exec function without input sanitizati…

  • Critical 9.8

    Arbitrary Command Injection

    This affects all versions of package picotts. If attacker-controlled user input is given to the say function, it is possible for an attacker to execute arbitrary commands. This is due to use of the child_process exec function without input sanitization.

  • Critical 9.8
    CVE-2020-2509 Exploited Public exploit EPSS 34%

    Command Injection Vulnerability in QTS and QuTS hero

    A command injection vulnerability has been reported to affect QTS and QuTS hero. If exploited, this vulnerability allows attackers to execute arbitrary commands in a compromised application. We have already fixed this vulnerability in the following versions: …

    KEV Apr 11, 2022
  • Critical 10.0

    An exploitable unatuhenticated command injection exists in the OpenClinic GA 5.173.3. Specially crafted web requests ca…

  • Critical 9.8

    Command injection in eslint-fixer

    The eslint-fixer package through 0.1.5 for Node.js allows command injection via shell metacharacters to the fix function. NOTE: This vulnerability only affects products that are no longer supported by the maintainer. The ozum/eslint-fixer GitHub repository ha…

  • Critical 9.8
    CVE-2020-8298 EPSS 11%

    Command injection in fs-path

    fs-path node module before 0.0.25 is vulnerable to command injection by way of user-supplied inputs via the `copy`, `copySync`, `remove`, and `removeSync` methods.

  • Critical 9.8

    SaltStack Salt command injection in the Salt-API when using the Salt-SSH client

    An issue was discovered in SaltStack Salt before 3002.5. Sending crafted web requests to the Salt API can result in salt.utils.thin.gen_thin() command injection because of different handling of single versus double quotes. This is related to salt/utils/thin.p…