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

2,705 results · Clear filters · Feed

  • High 7.2
    CVE-2026-0709 Public exploit

    Some Hikvision Wireless Access Points are vulnerable to authenticated command execution due to insufficient input valid…

  • High 7.8

    Dell Unity, version(s) 5.5.2 and prior, contain(s) an Improper Neutralization of Special Elements used in an OS Command…

  • High 7.8

    Dell UnityVSA, version(s) 5.4 and prior, contain(s) an Improper Neutralization of Special Elements used in an OS Comman…

  • High 8.3

    gradle-completion has a Bash command injection issue

    gradle-completion provides Bash and Zsh completion support for Gradle. A command injection vulnerability was found in gradle-completion up to and including 9.3.0 that allows arbitrary code execution when a user triggers Bash tab completion in a project contai…

  • High 7.2

    D-Link DIR-615 MAC Filter Configuration adv_mac_filter.php os command injection

    A vulnerability was determined in D-Link DIR-615 4.10. Impacted is an unknown function of the file /adv_mac_filter.php of the component MAC Filter Configuration. This manipulation of the argument mac causes os command injection. The attack is possible to be c…

  • High 7.2

    D-Link DIR-615 URL Filter set_temp_nodes.php os command injection

    A vulnerability was found in D-Link DIR-615 4.10. This issue affects some unknown processing of the file /set_temp_nodes.php of the component URL Filter. The manipulation results in os command injection. The attack can be executed remotely. The exploit has be…

  • High 7.8

    BrowserStack Local vulnerable to Command Injection through logfile variable

    The Node.js package browserstack-local 1.5.8 contains a command injection vulnerability. This occurs because the logfile variable is not properly sanitized in lib/Local.js.

  • High 7.8

    NVIDIA runx contains a vulnerability where an attacker could cause a code injection. A successful exploit of this vulne…

  • High 7.2

    Insecure File Handling allows Remote Code Execution in Backup Functionality

    Insecure file operations in HPE Aruba Networking Fabric Composer’s backup functionality could allow authenticated attackers to achieve remote code execution. Successful exploitation could allow an attacker to execute arbitrary commands on the underlying ope…

  • High 7.2

    D-Link DIR-615 Web Management wiz_policy_3_machine.php os command injection

    A vulnerability was detected in D-Link DIR-615 up to 4.10. This impacts an unknown function of the file /wiz_policy_3_machine.php of the component Web Management Interface. Performing a manipulation of the argument ipaddr results in os command injection. It i…

  • High 8.8

    WellChoose|Single Sign-On Portal System - OS Command Injection

    Single Sign-On Portal System developed by WellChoose has a OS Command Injection vulnerability, allowing authenticated remote attackers to inject arbitrary OS commands and execute them on the server.

  • High 8.8

    WellChoose|Single Sign-On Portal System - OS Command Injection

    Single Sign-On Portal System developed by WellChoose has a OS Command Injection vulnerability, allowing authenticated remote attackers to inject arbitrary OS commands and execute them on the server.

  • High 8.8

    LiteSpeed Web Server Enterprise 5.4.11 - Command Injection

    LiteSpeed Web Server Enterprise 5.4.11 contains an authenticated command injection vulnerability in the external app configuration interface. Authenticated administrators can inject shell commands through the 'Command' parameter in the server configuration, a…

  • High 7.8

    mcp-server-siri-shortcuts shortcutName Command Injection Privilege Escalation Vulnerability

    mcp-server-siri-shortcuts shortcutName Command Injection Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of mcp-server-siri-shortcuts. An attacker must first obtain the ability to …

  • High 8.8

    MCP Manager for Claude Desktop execute-command Command Injection Sandbox Escape Vulnerability

    MCP Manager for Claude Desktop execute-command Command Injection Sandbox Escape Vulnerability. This vulnerability allows remote attackers to bypass the sandbox on affected installations of MCP Manager for Claude Desktop. User interaction is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 8.1

    ALGO 8180 IP Audio Alerter SAC Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter SAC Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is not required to explo…

  • High 7.5

    ALGO 8180 IP Audio Alerter SCI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter SCI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploit t…

  • High 7.5

    ALGO 8180 IP Audio Alerter API Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter API Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploit t…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.2

    ALGO 8180 IP Audio Alerter Ping Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Ping Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploit …

  • High 7.2

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability

    ALGO 8180 IP Audio Alerter Web UI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of ALGO 8180 IP Audio Alerter devices. Authentication is required to exploi…

  • High 7.8

    An OS command injection vulnerability in the com.sprd.engineermode component in Doogee Note59, Note59 Pro, and Note59 P…

  • High 8.1

    Runtipi is Vulnerable to Authenticated Arbitrary Remote Code Execution

    Runtipi is a Docker-based, personal homeserver orchestrator that facilitates multiple services on a single server. Versions 3.7.0 and above allow an authenticated user to execute arbitrary system commands on the host server by injecting shell metacharacters i…

  • High 8.8

    Sangfor Operation and Maintenance Management System SSH Protocol session SessionController os command injection

    A vulnerability was identified in Sangfor Operation and Maintenance Management System up to 3.0.12. Affected by this issue is the function SessionController of the file /isomp-protocol/protocol/session of the component SSH Protocol Handler. The manipulation o…

  • High 7.2

    AP180 series with firmware versions prior to AP_RGOS 11.9(4)B1P8 contains an OS command injection vulnerability. If thi…

  • High 7.7

    OS Command Injection in `wrangler pages deploy`

    SummaryA command injection vulnerability (CWE-78) has been found to exist in the `wrangler pages deploy` command. The issue occurs because the `--commit-hash` parameter is passed directly to a shell command without proper validation or sanitization, allowing …

  • High 7.3

    NVIDIA Nsight Systems for Linux contains a vulnerability in the .run installer, where an attacker could cause an OS com…

  • High 7.3

    NVIDIA Nsight Systems contains a vulnerability in the gfx_hotspot recipe, where an attacker could cause an OS command i…

  • High 8.8

    Thecus N4800Eco Nas Server Control Panel - Command Injection

    Thecus N4800Eco NAS Server Control Panel contains a command injection vulnerability that allows authenticated attackers to execute arbitrary system commands through user management endpoints. Attackers can inject commands via username and batch user creation …

  • High 8.8

    OS Command Injection vulnerability exists in multiple Network Cameras TRIFORA 3 series provided by TOA Corporation, whi…

  • High 8.8

    ZesleCP 3.1.9 - Remote Code Execution (RCE) (Authenticated)

    ZesleCP 3.1.9 contains an authenticated remote code execution vulnerability that allows attackers to create malicious FTP accounts with shell injection payloads. Attackers can exploit the FTP account creation endpoint by injecting a reverse shell command that…

  • High 7.5

    Roxy-WI has a Command Injection via grep parameter in logs.py allows authenticated RCE

    Roxy-WI is a web interface for managing Haproxy, Nginx, Apache and Keepalived servers. Prior to 8.2.8.2, command injection vulnerability exists in the log viewing functionality that allows authenticated users to execute arbitrary system commands. The vulnerab…

  • High 7.8

    NVIDIA NSIGHT Graphics for Linux contains a vulnerability where an attacker could cause command injection. A successful…

  • High 7.2

    Cursor has a Terminal Tool Allowlist Bypass via Environment Variables

    Cursor is a code editor built for programming with AI. Prior to 2.3, hen the Cursor Agent is running in Auto-Run Mode with Allowlist mode enabled, certain shell built-ins can still be executed without appearing in the allowlist and without requiring user appr…

  • High 8.8

    Algo 8028 Control Panel - Remote Code Execution (RCE) (Authenticated)

    Algo 8028 Control Panel version 3.3.3 contains a command injection vulnerability in the fm-data.lua endpoint that allows authenticated attackers to execute arbitrary commands. Attackers can exploit the insecure 'source' parameter by injecting commands that ar…