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

  • High 8.8

    Tenda W30E v1.0 V1.0.1.25(633) firmware contains a command injection vulnerablility in the formexeCommand function via …

  • Low 3.8

    Tenda AC500 V2.0.1.9(1307) firmware contains a command injection vulnerablility in the formexeCommand function via the …

  • Medium 6.3

    Tenda FH1202 v1.2.0.14(408) firmware contains a command injection vulnerablility in the formexeCommand function via the…

  • High 8.8

    Tenda AC7V1.0 v15.03.06.44 firmware contains a command injection vulnerablility in formexeCommand function via the cmdi…

  • Medium 5.3

    Vulnerability in the Oracle Outside In Technology product of Oracle Fusion Middleware (component: Outside In Core). Sup…

  • Critical 9.1
    CVE-2024-32022 Public exploit

    Kohya_ss is vulnerable to a command injection in basic_caption_gui.py (GHSL-2024-019)

    Kohya_ss is a GUI for Kohya's Stable Diffusion trainers. Kohya_ss is vulnerable to command injection in basic_caption_gui.py. This vulnerability is fixed in 23.1.5.

  • Critical 9.1

    Kohya_ss is vulnerable to a command injection in `finetune_gui.py` (`GHSL-2024-022`)

    Kohya_ss is a GUI for Kohya's Stable Diffusion trainers. Kohya_ss v22.6.1 is vulnerable to command injection in `finetune_gui.py` This vulnerability is fixed in 23.1.5.

  • Critical 9.1

    Kohya_ss is vulnerable to a command injection in `git_caption_gui.py` (`GHSL-2024-020`)

    Kohya_ss is a GUI for Kohya's Stable Diffusion trainers. Kohya_ss is vulnerable to a command injection in `git_caption_gui.py`. This vulnerability is fixed in 23.1.5.

  • Critical 9.1

    Kohya_ss is vulnerable to a command injection in `group_images_gui.py` (`GHSL-2024-021`)

    Kohya_ss is a GUI for Kohya's Stable Diffusion trainers. Kohya_ss is vulnerable to a command injection in `group_images_gui.py`. This vulnerability is fixed in 23.1.5.

  • Critical 9.8

    Authenticated Remote Command Injection in Delta Electronics DVW

    The Delta Electronics DVW-W02W2-E2 devices expose a web administration interface to users. This interface implements multiple features that are affected by command injections and stack overflows vulnerabilities. Successful exploitation of these flaws would al…

  • Critical 9.8

    Command Injection in run-llama/llama_index

    A command injection vulnerability exists in the run-llama/llama_index repository, specifically within the safe_eval function. Attackers can bypass the intended security mechanism, which checks for the presence of underscores in code generated by LLM, to execu…

  • High 8.8

    Command injection vulnerability in PLANEX COMMUNICATIONS wireless LAN routers allows a network-adjacent unauthenticated…

  • High 7.8

    Insecure default configurations in Hikvision Interactive Tablet DS-D5B86RB/B V2.3.0 build220119, allows attackers to ex…

  • Critical 10.0
    CVE-2024-3400 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    PAN-OS: Arbitrary File Creation Leads to OS Command Injection Vulnerability in GlobalProtect

    A command injection as a result of arbitrary file creation vulnerability in the GlobalProtect feature of Palo Alto Networks PAN-OS software for specific PAN-OS versions and distinct feature configurations may enable an unauthenticated attacker to execute arbi…

    KEV Apr 12, 2024
  • High 8.8
    CVE-2024-29269 Public exploit Scanner template

    An issue discovered in Telesquare TLR-2005Ksh 1.0.0 and 1.1.4 allows attackers to run arbitrary system commands via the…

  • High 8.8

    Pods - Custom Content Types and Fields - Authenticated (Contributor+) Remote Code Execution

    The Pods – Custom Content Types and Fields plugin for WordPress is vulnerable to Remote Code Exxecution via shortcode in all versions up to, and including, 3.0.10 (with the exception of 2.7.31.2, 2.8.23.2, 2.9.19.2). This makes it possible for authenticated a…

  • High 7.2

    Microsoft Defender for IoT Remote Code Execution Vulnerability

    Microsoft Defender for IoT Remote Code Execution Vulnerability

  • High 8.0

    TOTOLINK EX200 V4.0.3c.7646_B20201211 was discovered to contain a remote code execution (RCE) vulnerability via the lan…

  • High 8.8

    A command injection vulnerability exists in /goform/exeCommand in Tenda AC18 v15.03.05.05, which allows attackers to co…

  • Critical 9.8

    A Command Injection vulnerability found in a Self-Hosted UniFi Network Servers (Linux) with UniFi Network Application (…

  • High 7.4
    CVE-2024-3116 Public exploit EPSS 66%

    Remote Code Execution Vulnerability through the validate binary path API in pgAdmin 4

    pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. This vulnerability allows attackers to execute arbitrary code on the server hosting PGAdmin, posing a severe risk to the database management system…

  • High 7.3
    CVE-2024-3273 Exploited Public exploit Scanner template EPSS 100%

    D-Link DNS-320L/DNS-325/DNS-327L/DNS-340L HTTP GET Request nas_sharing.cgi command injection

    ** UNSUPPORTED WHEN ASSIGNED ** A vulnerability, which was classified as critical, was found in D-Link DNS-320L, DNS-325, DNS-327L and DNS-340L up to 20240403. Affected is an unknown function of the file /cgi-bin/nas_sharing.cgi of the component HTTP GET Requ…

    KEV Apr 11, 2024
  • High 8.0

    Netgear R6850 1.1.0.88 was discovered to contain a command injection vulnerability via the ntp_server parameter.

  • High 7.4

    VMware SD-WAN Edge contains an unauthenticated command injection vulnerability potentially leading to remote code execu…

  • High 7.2

    There is a command injection vulnerability in some Hikvision NVRs. This could allow an authenticated user with administ…

  • Medium 4.1

    An issue discovered in Alldata v0.4.6 allows attacker to run arbitrary commands via the processId parameter.

  • Critical 9.8

    aliyundrive-webdav vulnerable to Command Injection

    An issue in aliyundrive-webdav v.2.3.3 and before allows a remote attacker to execute arbitrary code via a crafted payload to the sid parameter in the action_query_qrcode component.

  • High 8.8

    Tenda F1202 v1.2.0.20(408) has a command injection vulnerablility in the formWriteFacMac function in the mac parameter.

  • High 7.3

    Cockpit: command injection when deleting a sosreport with a crafted name

    A flaw was found in Cockpit. Deleting a sosreport with a crafted name via the Cockpit web interface can lead to a command injection vulnerability, resulting in privilege escalation. This issue affects Cockpit versions 270 and newer.

  • Medium 6.3

    Tenda FH1205 WriteFacMac formWriteFacMac command injection

    A vulnerability has been found in Tenda FH1205 2.0.0.7(775) and classified as critical. Affected by this vulnerability is the function formWriteFacMac of the file /goform/WriteFacMac. The manipulation of the argument mac leads to command injection. The attack…

  • Medium 6.3

    Tenda FH1203 WriteFacMac formWriteFacMac command injection

    A vulnerability has been found in Tenda FH1203 2.0.1.6 and classified as critical. This vulnerability affects the function formWriteFacMac of the file /goform/WriteFacMac. The manipulation of the argument mac leads to command injection. The attack can be init…

  • High 8.6
    CVE-2024-1540 Public exploit

    Command Injection in gradio-app/gradio via deploy+test-visual.yml workflow

    A command injection vulnerability exists in the deploy+test-visual.yml workflow of the gradio-app/gradio repository, due to improper neutralization of special elements used in a command. This vulnerability allows attackers to execute unauthorized commands, po…

  • Medium 5.5

    Tenda FH1202 WriteFacMac formWriteFacMac command injection

    A vulnerability has been found in Tenda FH1202 1.2.0.14(408) and classified as critical. Affected by this vulnerability is the function formWriteFacMac of the file /goform/WriteFacMac. The manipulation of the argument mac leads to command injection. The explo…

  • Critical 9.8

    Tenda AC18 V15.03.05.05 contains a command injection vulnerablility in the deviceName parameter of formsetUsbUnload fun…

  • High 8.1

    Remote command execution in A-Tune-Collector

    Improper Neutralization of Special Elements used in a Command ('Command Injection') vulnerability in openEuler A-Tune-Collector on Linux allows Command Injection. This vulnerability is associated with program files https://gitee.Com/openeuler/A-Tune-Collector…

  • High 8.8

    HGW BL1500HM Ver 002.001.013 and earlier allows a network-adjacent unauthenticated attacker to execute an arbitrary com…

  • Critical 9.0

    DIR-845L router <= v1.01KRb03 has an Unauthenticated remote code execution vulnerability in the cgibin binary via soapc…

  • High 8.8

    A command injection vulnerability exists in the cgibin binary in DIR-845L router firmware <= v1.01KRb03.

  • Critical 9.8

    Distrobox before 1.7.0.1 allows attackers to execute arbitrary code via command injection into exported executables.

  • High 7.3

    Ruijie RG-NBS2009G-P EXCU_SHELL command injection

    A vulnerability was found in Ruijie RG-NBS2009G-P up to 20240305. It has been declared as critical. Affected by this vulnerability is an unknown functionality of the file /EXCU_SHELL. The manipulation of the argument Command1 leads to command injection. The a…