Skip to content
OpenAdvisories

Weakness (CWE)

CWE-78: OS Command Injection

Base Improper Neutralization of Special Elements used in an OS Command

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

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

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

  2. Architecture and Design, Operation

    Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.

    OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.

    This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.

    Be careful to avoid CWE-243 and other weaknesses related to jails.

  3. Architecture and Design

    For any data that will be used to generate a command to be executed, keep as much of that data out of external control as possible. For example, in web applications, this may require storing the data locally in the session's state instead of sending it out to the client in a hidden form field.

  4. Architecture and Design

    For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

  5. Architecture and Design

    Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.

    For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error.

  6. Implementation

    While it is risky to use dynamically-generated query strings, code, or commands that mix control and data together, sometimes it may be unavoidable. Properly quote arguments and escape any special characters within those arguments. The most conservative approach is to escape or filter all characters that do not pass an extremely strict allowlist (such as everything that is not alphanumeric or white space). If some special characters are still needed, such as white space, wrap each argument in quotes after the escaping/filtering step. Be careful of argument injection (CWE-88).

  7. Implementation

    If the program to be executed allows arguments to be specified within an input file or from standard input, then consider using that mode to pass arguments instead of the command line.

  8. Architecture and Design

    If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.

    Some languages offer multiple functions that can be used to invoke commands. Where possible, identify any function that invokes a command shell using a single string, and replace it with a function that requires individual arguments. These functions typically perform appropriate quoting and filtering of arguments. For example, in C, the system() function accepts a string that contains the entire command to be executed, whereas execl(), execve(), and others require an array of strings, one for each argument. In Windows, CreateProcess() only accepts one command at a time. In Perl, if system() is provided with an array of arguments, then it will quote each of the arguments.

Source: MITRE CWE-78

214 results · Clear filters · Feed

  • High 8.3
    CVE-2024-42370 Public exploit

    Litestar repository vulnerable to Environment Variable injection in `docs-preview.yml` workflow

    Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In versions 2.10.0 and prior, Litestar's `docs-preview.yml` workflow is vulnerable to Environment Variable injection which may lead to secret exfiltration and repository manipulation. This…

  • High 7.2
    CVE-2024-33896 Public exploit

    Cosy+ devices running a firmware 21.x below 21.2s10 or a firmware 22.x below 22.1s3 are vulnerable to code injection du…

  • High 7.5
    CVE-2024-4253 Public exploit

    Command Injection in gradio-app/gradio

    A command injection vulnerability exists in the gradio-app/gradio repository, specifically within the 'test-functional.yml' workflow. The vulnerability arises due to improper neutralization of special elements used in a command, allowing for unauthorized modi…

  • High 8.8
    CVE-2023-38120 Public exploit

    Adtran SR400ac ping Command Injection Remote Code Execution Vulnerability

    Adtran SR400ac ping Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Adtran SR400ac routers. Although authentication is required to exploit this vulnerabil…

  • High 8.7
    CVE-2024-20356 Public exploit EPSS 30%

    A vulnerability in the web-based management interface of Cisco Integrated Management Controller (IMC) could allow an au…

  • High 8.8
    CVE-2024-1655 Public exploit

    ASUS WiFi Router - OS Command Injection

    Certain ASUS WiFi routers models has an OS Command Injection vulnerability, allowing an authenticated remote attacker to execute arbitrary system commands by sending a specially crafted request.

  • High 8.8
    CVE-2024-28254 Public exploit EPSS 46%

    SpEL Injection in `GET /api/v1/events/subscriptions/validation/condition/<expr>` in OpenMetadata

    OpenMetadata is a unified platform for discovery, observability, and governance powered by a central metadata repository, in-depth lineage, and seamless team collaboration. The `‎AlertUtil::validateExpression` method evaluates an SpEL expression using `getVal…

  • High 7.2
    CVE-2023-43482 Public exploit

    A command execution vulnerability exists in the guest resource functionality of Tp-Link ER7206 Omada Gigabit VPN Router…

  • High 8.8
    CVE-2023-50094 Public exploit Scanner template EPSS 14%

    reNgine before 2.1.2 allows OS Command Injection if an adversary has a valid session ID. The attack places shell metach…

  • High 8.8
    CVE-2023-41348 Public exploit

    ASUS RT-AX55 - command injection - 4

    ASUS RT-AX55’s authentication-related function has a vulnerability of insufficient filtering of special characters within its code-authentication module. An authenticated remote attacker can exploit this vulnerability to perform a Command Injection attack to …

  • High 8.8
    CVE-2023-41346 Public exploit

    ASUS RT-AX55 - command injection - 2

    ASUS RT-AX55’s authentication-related function has a vulnerability of insufficient filtering of special characters within its token-refresh module. An authenticated remote attacker can exploit this vulnerability to perform a Command Injection attack to execut…

  • High 7.2
    CVE-2023-20273 Exploited Public exploit EPSS 93%

    A vulnerability in the web UI feature of Cisco IOS XE Software could allow an authenticated, remote attacker to inject …

    KEV Oct 23, 2023
  • High 8.8
    CVE-2023-39780 Exploited Public exploit EPSS 40%

    On ASUS RT-AX55 3.0.0.4.386.51598 devices, authenticated attackers can perform OS command injection via the /start_appl…

    KEV Jun 2, 2025
  • High 7.2
    CVE-2023-39362 Public exploit EPSS 85%

    Authenticated command injection in SNMP options of a Device

    Cacti is an open source operational monitoring and fault management framework. In Cacti 1.2.24, under certain conditions, an authenticated privileged user, can use a malicious string in the SNMP options of a Device, performing command injection and obtaining …

  • High 8.8
    CVE-2023-37569 Public exploit EPSS 34%

    OS Command Injection Vulnerability in Emagic Data Center Management Suite

    This vulnerability exists in ESDS Emagic Data Center Management Suit due to lack of input sanitization in its Ping component. A remote authenticated attacker could exploit this by injecting OS commands on the targeted system. Successful exploitation of this v…

  • High 8.8
    CVE-2023-33012 Public exploit

    A command injection vulnerability in the configuration parser of the Zyxel ATP series firmware versions 5.10 through 5.…

  • High 8.8
    CVE-2023-34127 Public exploit EPSS 86%

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in SonicWall G…

  • High 7.2
    CVE-2023-33381 Public exploit EPSS 22%

    A command injection vulnerability was found in the ping functionality of the MitraStar GPT-2741GNAC router (firmware ve…

  • High 8.8
    CVE-2023-30253 Public exploit EPSS 82%

    Dolibarr vulnerable to remote code execution via uppercase manipulation

    Dolibarr before 17.0.1 allows remote code execution by an authenticated user via an uppercase manipulation: <?PHP instead of <?php in injected data.

  • High 7.2
    CVE-2023-33617 Public exploit

    An OS Command Injection vulnerability in Parks Fiberlink 210 firmware version V2.1.14_X000 was found via the /boaform/a…

  • High 8.8
    CVE-2023-30854 Public exploit

    WWBN AVideo vulnerable to OS Command Injection

    AVideo is an open source video platform. Prior to version 12.4, an OS Command Injection vulnerability in an authenticated endpoint `/plugin/CloneSite/cloneClient.json.php` allows attackers to achieve Remote Code Execution. This issue is fixed in version 12.4.

  • High 8.4
    CVE-2023-28528 Public exploit

    IBM AIX command execution

    IBM AIX 7.1, 7.2, 7.3, and VIOS 3.1 could allow a non-privileged local user to exploit a vulnerability in the invscout command to execute arbitrary commands. IBM X-Force ID: 251207.

  • High 8.8
    CVE-2022-38841 Public exploit EPSS 11%

    Linksys AX3200 1.1.00 is vulnerable to OS command injection by authenticated users via shell metacharacters to the diag…

  • High 8.8
    CVE-2023-27216 Public exploit

    An issue found in D-Link DSL-3782 v.1.03 allows remote authenticated users to execute arbitrary code as root via the ne…

  • High 8.8
    CVE-2023-27826 Public exploit EPSS 12%

    SeowonIntech SWC 5100W WIMAX Bootloader 1.18.19.0, HW 0.0.7.0, and FW 1.11.0.1, 1.9.9.4 are vulnerable to OS Command In…

  • High 7.1
    CVE-2023-26039 Public exploit

    ZoneMinder vulnerable to OS Command injection in daemonControl() API

    ZoneMinder is a free, open source Closed-circuit television software application for Linux which supports IP, USB and Analog cameras. Versions prior to 1.36.33 and 1.37.33 contain an OS Command Injection via daemonControl() in (/web/api/app/Controller/HostCon…

  • High 8.8
    CVE-2022-46649 Public exploit

    Acemanager in ALEOS before version 4.16 allows a user with valid credentials to manipulate the IP logging operation to …

  • High 8.8
    CVE-2022-46552 Public exploit EPSS 11%

    D-Link DIR-846 Firmware FW100A53DBR was discovered to contain a remote command execution (RCE) vulnerability via the la…

  • High 8.8
    CVE-2023-24422 Public exploit

    Sandbox bypass in Jenkins Script Security Plugin

    A sandbox bypass vulnerability involving map constructors in Jenkins Script Security Plugin 1228.vd93135a_2fb_25 and earlier allows attackers with permission to define and run sandboxed scripts, including Pipelines, to bypass the sandbox protection and execut…

  • High 7.8
    CVE-2022-45639 Public exploit

    OS Command injection vulnerability in sleuthkit fls tool 4.11.1 allows attackers to execute arbitrary commands via a cr…

  • High 7.2
    CVE-2022-43973 Public exploit

    Arbitrary code execution in Linksys WRT54GL

    An arbitrary code execution vulnerability exisits in Linksys WRT54GL Wireless-G Broadband Router with firmware <= 4.30.18.006. The Check_TSSI function within the httpd binary uses unvalidated user input in the construction of a system command. An authenticate…

  • High 8.8
    CVE-2022-44149 Public exploit EPSS 64%

    The web service on Nexxt Amp300 ARN02304U8 42.103.1.5095 and 80.103.2.5045 devices allows remote OS command execution b…

  • High 8.8
    CVE-2022-40127 Public exploit Scanner template EPSS 86%

    Apache Airflow <2.4.0 has an RCE in a bash example

    A vulnerability in Example Dags of Apache Airflow allows an attacker with UI access who can trigger DAGs, to execute arbitrary commands via manually provided run_id parameter. This issue affects Apache Airflow Apache Airflow versions prior to 2.4.0.

  • High 8.8
    CVE-2022-36804 Exploited Public exploit Scanner template EPSS 99%

    Multiple API endpoints in Atlassian Bitbucket Server and Data Center 7.0.0 before version 7.6.17, from version 7.7.0 be…

    KEV Sep 30, 2022
  • High 8.8
    CVE-2022-33891 Exploited Public exploit Scanner template EPSS 93%

    Apache Spark shell command injection vulnerability via Spark UI

    The Apache Spark UI offers the possibility to enable ACLs via the configuration option spark.acls.enable. With an authentication filter, this checks whether a user has access permissions to view or modify the application. If ACLs are enabled, a code path in H…

    KEV Mar 7, 2023
  • High 8.8
    CVE-2022-31138 Public exploit

    OS Command Injection in mailcow

    mailcow is a mailserver suite. Prior to mailcow-dockerized version 2022-06a, an extended privilege vulnerability can be exploited by manipulating the custom parameters regexmess, skipmess, regexflag, delete2foldersonly, delete2foldersbutnot, regextrans2, pipe…

  • High 7.5
    CVE-2022-28171 Public exploit EPSS 52%

    The web module in some Hikvision Hybrid SAN/Cluster Storage products have the following security vulnerability. Due to …

  • High 8.8
    CVE-2022-33140 Public exploit

    Improper Neutralization of Command Elements in Shell User Group Provider

    The optional ShellUserGroupProvider in Apache NiFi 1.10.0 to 1.16.2 and Apache NiFi Registry 0.6.0 to 1.16.2 does not neutralize arguments for group resolution commands, allowing injection of operating system commands on Linux and macOS platforms. The ShellUs…

  • High 8.8
    CVE-2022-25174 Public exploit

    Improper Neutralization of Special Elements used in an OS Command in Jenkins Pipeline: Shared Groovy Libraries Plugin

    Jenkins Pipeline: Shared Groovy Libraries Plugin 552.vd9cc05b8a2e1 and earlier uses the same checkout directories for distinct SCMs for Pipeline libraries, allowing attackers with Item/Configure permission to invoke arbitrary OS commands on the controller thr…

  • High 8.8
    CVE-2022-25173 Public exploit

    Improper Neutralization of Special Elements used in an OS Command in Jenkins Pipeline: Groovy Plugin

    Jenkins Pipeline: Groovy Plugin 2648.va9433432b33c and earlier uses the same checkout directories for distinct SCMs when reading the script file (typically Jenkinsfile) for Pipelines, allowing attackers with Item/Configure permission to invoke arbitrary OS co…