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

94 results · Clear filters · Feed

  • Critical 9.9
    CVE-2019-15954 Public exploit EPSS 79%

    Total.js CMS RCE Vulnerability

    An issue was discovered in Total.js CMS 12.0.0. An authenticated user with the widgets privilege can gain achieve Remote Command Execution (RCE) on the remote server by creating a malicious widget with a special tag containing JavaScript code that will be eva…

  • Critical 9.8
    CVE-2013-7285 Public exploit Scanner template EPSS 84%

    Command Injection in Xstream

    Xstream API versions up to 1.4.6 and version 1.4.10, if the security framework has not been initialized, may allow a remote attacker to run arbitrary shell commands by manipulating the processed input stream when unmarshaling XML or any supported format. e.g.…

  • Critical 9.8
    CVE-2019-5420 Public exploit EPSS 89%

    Use of Insufficiently Random Values in Railties Allows Remote Code Execution

    A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically generated development mode secret token. This secret token can be used in combination with other Rails internals to escalat…

  • Critical 9.8
    CVE-2016-1000282 Public exploit EPSS 13%

    Critical severity vulnerability that affects Haraka

    Haraka version 2.8.8 and earlier comes with a plugin for processing attachments for zip files. Versions 2.8.8 and earlier can be vulnerable to command injection.

  • Critical 9.8
    CVE-2018-3786 Public exploit EPSS 12%

    Command Injection in egg-scripts

    A command injection vulnerability in egg-scripts <v2.8.1 allows arbitrary shell command execution through a maliciously crafted command line argument.

  • Critical 9.1
    CVE-2018-12465 Public exploit EPSS 80%

    Remote Code Execution in Micro Focus Secure Messaging Gateway

    An OS command injection vulnerability in the web administration component of Micro Focus Secure Messaging Gateway (SMG) allows a remote attacker authenticated as a privileged user to execute arbitrary OS commands on the SMG server. This can be exploited in co…

  • Critical 9.8
    CVE-2016-1555 Exploited Public exploit Scanner template EPSS 98%

    (1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgea…

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2016-10045 Public exploit EPSS 98%

    Remote code execution in PHPMailer

    The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping perf…

  • Critical 9.8
    CVE-2016-10034 Public exploit EPSS 38%

    zend-mail remote code execution via Sendmail adapter

    The setFrom function in the Sendmail adapter in the zend-mail component before 2.4.11, 2.5.x, 2.6.x, and 2.7.x before 2.7.2, and Zend Framework before 2.4.11 might allow remote attackers to pass extra parameters to the mail command and consequently execute ar…

  • Critical 9.8
    CVE-2016-10033 Exploited Public exploit Scanner template EPSS 100%

    Remote code execution in PHPMailer

    The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property.

    KEV Jul 7, 2025
  • Critical 9.8
    CVE-2016-10074 Public exploit EPSS 44%

    Swift Mailer mail transport Command Injection

    The mail transport (aka Swift_Transport_MailTransport) in Swift Mailer before 5.4.5 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted e-mail address…

  • Critical 9.8
    CVE-2012-1823 Exploited Public exploit Scanner template EPSS 100%

    sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does no…

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2007-3010 Exploited Public exploit Scanner template EPSS 97%

    masterCGI in the Unified Maintenance Tool in Alcatel OmniPCX Enterprise Communication Server R7.1 and earlier allows re…

    KEV Apr 15, 2022
  • Critical 9.8
    CVE-2005-2773 Exploited Public exploit EPSS 74%

    HP OpenView Network Node Manager 6.2 through 7.50 allows remote attackers to execute arbitrary commands via shell metac…

    KEV Mar 25, 2022