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

3,210 results · Feed

  • Medium 6.8

    ScanCode.io command injection in docker image fetch process

    ScanCode.io is a server to script and automate software composition analysis with ScanPipe pipelines. Prior to version 32.5.1, the software has a possible command injection vulnerability in the docker fetch process as it allows to append malicious commands in…

  • Medium 5.8

    matrix-appservice-irc IRC command injection via admin commands containing newlines

    matrix-appservice-irc is a Node.js IRC bridge for Matrix. Prior to version 1.0.1, it is possible to craft a command with newlines which would not be properly parsed. This would mean you could pass a string of commands as a channel name, which would then be ru…

  • Medium 6.3
    CVE-2023-4120 EPSS 62%

    Byzoro Smart S85F Management Platform importhtml.php command injection

    A vulnerability was found in Byzoro Smart S85F Management Platform up to 20230722 and classified as critical. This issue affects some unknown processing of the file importhtml.php. The manipulation of the argument sql leads to command injection. The attack ma…

  • Low 3.5

    Attackers with access to user accounts can inject arbitrary control characters to SIEVE mail-filter rules. This could b…

  • High 8.8
    CVE-2022-39987 EPSS 37%

    RaspAP Command Injection vulnerability

    A Command injection vulnerability in RaspAP 2.8.0 thru 2.9.2 allows an authenticated attacker to execute arbitrary OS commands as root via the "entity" POST parameters in /ajax/networking/get_wgkey.php.

  • Critical 9.8
    CVE-2022-39986 Public exploit Scanner template EPSS 99%

    RaspAP Command Injection vulnerability

    A Command injection vulnerability in RaspAP 2.8.0 thru 2.8.7 allows unauthenticated attackers to execute arbitrary commands via the cfg_id parameter in /ajax/openvpn/activate_ovpncfg.php and /ajax/openvpn/del_ovpncfg.php.

  • High 7.5

    Spring-boot-admin sandbox bypass via crafted HTML

    Thymeleaf through 3.1.1.RELEASE, as used in spring-boot-admin (aka Spring Boot Admin) through 3.1.1 and other products, allows sandbox bypass via crafted HTML. This may be relevant for SSTI (Server Side Template Injection) and code execution in spring-boot-ad…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    A vulnerability has been identified in RUGGEDCOM ROX MX5000 (All versions < V2.16.0), RUGGEDCOM ROX MX5000RE (All versi…

  • Critical 9.1

    Authenticated Remote COmmand Execution as root in OSNEXUS QuantaStor version 6.0.0.355 and others

    An authenticated attacker is able to create alerts that trigger a stored XSS attack. POC * go to the alert manager * open the ITSM tab * add a webhook with the URL/service token value ' -h && id | tee /tmp/ttttttddddssss #' (whitespaces are tab characters) * …

  • High 7.2

    An OS command injection vulnerability exists in the ys_thirdparty user_delete functionality of Milesight UR32L v32.3.0.…

  • High 7.2

    An OS command injection vulnerability exists in the libzebra.so bridge_group functionality of Milesight UR32L v32.3.0.5…

  • High 7.2

    An os command injection vulnerability exists in the libzebra.so change_hostname functionality of Milesight UR32L v32.3.…

  • High 8.1

    An os command injection vulnerability exists in the liburvpn.so create_private_key functionality of Milesight VPN v2.0.…

  • High 8.8

    Two OS command injection vulnerability exist in the vtysh_ubus toolsh_excute.constprop.1 functionality of Milesight UR3…

  • High 8.8

    Two OS command injection vulnerability exist in the vtysh_ubus toolsh_excute.constprop.1 functionality of Milesight UR3…

  • High 8.8

    Two OS command injection vulnerabilities exist in the urvpn_client cmd_name_action functionality of Milesight UR32L v32…

  • High 8.8

    Two OS command injection vulnerabilities exist in the urvpn_client cmd_name_action functionality of Milesight UR32L v32…

  • Medium 6.3

    1Panel vulnerable to command injection when adding container repositories

    1Panel is an open source Linux server operation and maintenance management panel. Prior to version 1.3.6, an authenticated attacker can craft a malicious payload to achieve command injection when adding container repositories. The vulnerability has been fixed…

  • Medium 6.3

    1Panel vulnerable to ommand injection when entering the container terminal

    1Panel is an open source Linux server operation and maintenance management panel. Prior to version 1.3.6, an authenticated attacker can craft a malicious payloads to achieve command injection when entering the container terminal. The vulnerability has been fi…

  • Unscored —

    com.perimeter81.osx.HelperTool in Perimeter81 10.0.0.19 on macOS allows Local Privilege Escalation (to root) via shell …

  • Critical 9.8

    git-commit-info vulnerable to Command Injection

    Versions of the package git-commit-info before 2.0.2 are vulnerable to Command Injection such that the package-exported method gitCommitInfo () fails to sanitize its parameter commit, which later flows into a sensitive command execution API. As a result, atta…

  • High 7.1

    jcvi vulnerable to Configuration Injection due to unsanitized user input

    jcvi is a Python library to facilitate genome assembly, annotation, and comparative genomics. A configuration injection happens when user input is considered by the application in an unsanitized format and can reach the configuration file. A malicious user ma…

  • Critical 9.8
    CVE-2023-30258 Public exploit Scanner template EPSS 94%

    Command Injection vulnerability in MagnusSolution magnusbilling 6.x and 7.x allows remote attackers to run arbitrary co…

  • High 8.8

    RaspAP raspap-webgui Command Injection vulnerability

    Command injection vulnerability in RaspAP raspap-webgui 2.8.8 and earlier allows remote attackers to run arbitrary commands via crafted POST request to hostapd settings form.

  • Low 3.5

    Control characters were not removed when exporting user feedback content. This allowed attackers to include unexpected …

  • Critical 9.8

    There is a command injection vulnerability in the adslr VW2100 router with firmware version M1DV1.0. An unauthenticated…

  • High 7.2
    CVE-2023-33919 EPSS 48%

    A vulnerability has been identified in CP-8031 MASTER MODULE (All versions < CPCI85 V05), CP-8050 MASTER MODULE (All ve…

  • Critical 9.8

    TP-Link TL-WPA8630P (US)_ V2_ Version 171011 was discovered to contain a command injection vulnerability via the device…

  • Critical 9.8

    TP-Link TL-WPA8630P (US)_ V2_ Version 171011 was discovered to contain a command injection vulnerability via the key pa…

  • High 8.8

    Previous versions of HP Device Manager (prior to HPDM 5.0.10) could potentially allow command injection and/or elevatio…

  • High 8.8

    Previous versions of HP Device Manager (prior to HPDM 5.0.10) could potentially allow command injection and/or elevatio…

  • High 8.8

    Previous versions of HP Device Manager (prior to HPDM 5.0.10) could potentially allow command injection and/or elevatio…

  • Critical 9.8

    Previous versions of HP Device Manager (prior to HPDM 5.0.10) could potentially allow command injection and/or elevatio…

  • High 7.8

    Previous versions of HP Device Manager (prior to HPDM 5.0.10) could potentially allow command injection and/or elevatio…

  • High 8.8

    Atos Unify OpenScape 4000 Assistant V10 R1 before V10 R1.42.0 and V10 R1.34.8, Assistant V10 R0, Manager V10 R1 before …