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.6
    CVE-2025-34227 Public exploit EPSS 26%

    Nagios XI < 2026R1 Configuration Wizard Authenticated Command Injection

    Nagios XI < 2026R1 is vulnerable to an authenticated command injection vulnerability within the MongoDB Database, MySQL Query, MySQL Server, Postgres Server, and Postgres Query wizards. It is possible to inject shell characters into arguments provided to the …

  • High 7.5
    CVE-2025-58180 Public exploit EPSS 26%

    OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload

    OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.11.2 contain a vulnerability that allows an authenticated attacker to upload a file under a specially crafted filename that will allow arbitra…

  • High 8.4
    CVE-2025-56803 Public exploit

    Figma Desktop for Windows version 125.6.5 contains a command injection vulnerability in the local plugin loader. An att…

  • High 8.7
    CVE-2005-10004 Public exploit

    Cacti graph_view.php RCE via graph_start Parameter Injection

    Cacti versions prior to 0.8.6-d contain a remote command execution vulnerability in the graph_view.php script. An authenticated user can inject arbitrary shell commands via the graph_start GET parameter, which is improperly handled during graph rendering. Thi…

  • High 8.6
    CVE-2012-10028 Public exploit

    Netwin SurgeFTP <= v23c8 Authenticated RCE

    Netwin SurgeFTP version 23c8 and prior contains a vulnerability in its web-based administrative console that allows authenticated users to execute arbitrary system commands via crafted POST requests to `surgeftpmgr.cgi`. This can lead to full remote code exec…

  • High 8.6
    CVE-2012-10029 Public exploit

    Nagios XI Network Monitor Graph Explorer Component < 1.3 Authenticated Command Injection

    Nagios XI Network Monitor prior to Graph Explorer component version 1.3 contains a command injection vulnerability in `visApi.php`. An authenticated user can inject system commands via unsanitized parameters such as `host`, resulting in remote code execution.

  • High 8.6
    CVE-2025-54135 Public exploit

    Cursor Agent is vulnerable to prompt injection via MCP Special Files

    Cursor is a code editor built for programming with AI. Cursor allows writing in-workspace files with no user approval in versions below 1.3.9, If the file is a dotfile, editing it requires approval but creating a new one doesn't. Hence, if sensitive MCP files…

  • High 8.7
    CVE-2025-54795 Public exploit

    Claude Code echo command allowed bypass of user approval prompt for command execution

    Claude Code is an agentic coding tool. In versions below 1.0.20, an error in command parsing makes it possible to bypass the Claude Code confirmation prompt to trigger execution of an untrusted command. Reliably exploiting this requires the ability to add unt…

  • High 7.3
    CVE-2025-36604 Public exploit Scanner template EPSS 70%

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

  • High 7.2
    CVE-2025-54136 Public exploit EPSS 32%

    Cursor's Modification of MCP Server Definitions Bypasses Manual Re-approvals

    Cursor is a code editor built for programming with AI. In versions 1.2.4 and below, attackers can achieve remote and persistent code execution by modifying an already trusted MCP configuration file inside a shared GitHub repository or editing the file locally…

  • High 8.7
    CVE-2013-10053 Public exploit

    ZPanel <= 10.0.0.2 htpasswd Module Username Command Execution

    A remote command execution vulnerability exists in ZPanel version 10.0.0.2 in its htpasswd module. When creating .htaccess files, the inHTUsername field is passed unsanitized to a system() call that invokes the system’s htpasswd binary. By injecting shell met…

  • High 8.6
    CVE-2013-10061 Public exploit

    Netgear Routers setup.cgi RCE

    An authenticated OS command injection vulnerability exists in Netgear routers (tested on the DGN1000B model firmware versions 1.1.00.24 and 1.1.00.45) via the TimeToLive parameter in the setup.cgi endpoint. The vulnerability arises from improper input neutral…

  • High 8.6
    CVE-2013-10058 Public exploit

    Linksys Routers apply.cgi Remote Command Injection

    An authenticated OS command injection vulnerability exists in various Linksys router models (tested on WRT160Nv2) running firmware version v2.0.03 via the apply.cgi endpoint. The web interface fails to properly sanitize user-supplied input passed to the ping_…

  • High 8.7
    CVE-2013-10050 Public exploit EPSS 13%

    D-Link Devices tools_vct.xgi Authenticated RCE

    An OS command injection vulnerability exists in multiple D-Link routers (confirmed on DIR-300 rev A v1.05 and DIR-615 rev D v4.13) via the authenticated tools_vct.xgi CGI endpoint. The web interface fails to properly sanitize user-supplied input in the pingIp…

  • High 8.6
    CVE-2013-10059 Public exploit EPSS 26%

    D-Link Routers tools_vct.htm OS Command Injection

    An authenticated OS command injection vulnerability exists in various D-Link routers (tested on DIR-615H1 running firmware version 8.04) via the tools_vct.htm endpoint. The web interface fails to sanitize input passed from the ping_ipaddr parameter to the too…

  • High 8.7
    CVE-2013-10039 Public exploit

    GestioIP 3.0 ip_checkhost.cgi RCE

    A command injection vulnerability exists in GestioIP 3.0 commit ac67be and earlier in ip_checkhost.cgi. Crafted input to the 'ip' parameter allows attackers to execute arbitrary shell commands on the server via embedded base64-encoded payloads. Authentication…

  • High 8.7
    CVE-2025-34113 Public exploit

    Tiki Wiki CMS Authenticated Command Injection in Calendar Module

    An authenticated command injection vulnerability exists in Tiki Wiki CMS versions ≤14.1, ≤12.4 LTS, ≤9.10 LTS, and ≤6.14 via the `viewmode` GET parameter in `tiki-calendar.php`. When the calendar module is enabled and an authenticated user has permission to a…

  • High 8.7
    CVE-2025-34115 Public exploit

    OP5 Monitor <= 7.1.9 Authenticated Command Execution via command_test.php

    An authenticated command injection vulnerability exists in OP5 Monitor through version 7.1.9 via the 'cmd_str' parameter in the command_test.php endpoint. A user with access to the web interface can exploit the 'Test this command' feature to execute arbitrary…

  • High 8.7
    CVE-2025-34116 Public exploit

    IPFire < 2.19 Core Update 101 proxy.cgi RCE

    A remote command execution vulnerability exists in IPFire before version 2.19 Core Update 101 via the 'proxy.cgi' CGI interface. An authenticated attacker can inject arbitrary shell commands through crafted values in the NCSA user creation form fields, leadin…

  • High 8.3
    CVE-2013-3307 Public exploit EPSS 63%

    Linksys E1000 devices through 2.1.02, E1200 devices before 2.0.05, and E3200 devices through 1.0.04 allow OS command in…

  • High 7.5
    CVE-2025-34093 Public exploit

    Polycom HDX Series Telnet Command Injection via lan traceroute

    An authenticated command injection vulnerability exists in the Polycom HDX Series command shell interface accessible over Telnet. The lan traceroute command in the devcmds console accepts unsanitized input, allowing attackers to execute arbitrary system comma…

  • High 8.6
    CVE-2025-34088 Public exploit

    Pandora FMS Authenticated Remote Code Execution via Ping Module

    An authenticated remote code execution vulnerability exists in Pandora FMS version 7.0NG and earlier. The net_tools.php functionality allows authenticated users to execute arbitrary OS commands via the select_ips parameter when performing network tools operat…

  • High 8.8
    CVE-2025-30004 Public exploit

    Xorcom CompletePBX <= 5.2.35 Task Scheduler Authenticated Command Injection

    Xorcom CompletePBX is vulnerable to command injection in the administrator Task Scheduler functionality, allowing for attackers to execute arbitrary commands as the root user. This issue affects CompletePBX: all versions up to and prior to 5.2.35

  • High 8.8
    CVE-2025-20029 Public exploit

    BIG-IP iControl REST and tmsh vulnerability

    Command injection vulnerability exists in iControl REST and BIG-IP TMOS Shell (tmsh) save command, which may allow an authenticated attacker to execute arbitrary system commands. Note: Software versions which have reached End of Technical Support (EoTS) are n…

  • High 8.8
    CVE-2024-40891 Exploited Public exploit EPSS 23%

    **UNSUPPORTED WHEN ASSIGNED** A post-authentication command injection vulnerability in the management commands of the l…

    KEV Feb 11, 2025
  • High 7.2
    CVE-2024-12856 Public exploit EPSS 84%

    Four-Faith Industrial Router adjust_sys_time OS Command Injection

    The Four-Faith router models F3x24 and F3x36 are affected by an operating system (OS) command injection vulnerability. At least firmware version 2.0 allows authenticated and remote attackers to execute arbitrary OS commands over HTTP when modifying the system…

  • High 7.3
    CVE-2024-12986 Public exploit EPSS 36%

    DrayTek Vigor2960/Vigor300B Web Management Interface apmcfgupptim os command injection

    A vulnerability, which was classified as critical, has been found in DrayTek Vigor2960 and Vigor300B 1.5.1.3/1.5.1.4. This issue affects some unknown processing of the file /cgi-bin/mainfunction.cgi/apmcfgupptim of the component Web Management Interface. The …

  • High 8.8
    CVE-2024-53376 Public exploit EPSS 11%

    CyberPanel before 2.3.8 allows remote authenticated users to execute arbitrary commands via shell metacharacters in the…

  • High 8.0
    CVE-2024-53375 Public exploit EPSS 42%

    An Authenticated Remote Code Execution (RCE) vulnerability affects the TP-Link Archer router series. A vulnerability ex…

  • High 7.8
    CVE-2024-11003 Public exploit EPSS 12%

    Qualys discovered that needrestart, before version 3.8, passes unsanitized data to a library (Modules::ScanDeps) which …

  • High 8.6
    CVE-2024-52010 Public exploit

    Zoraxy has an authenticated command injection in the Web SSH feature

    Zoraxy is a general purpose HTTP reverse proxy and forwarding tool. A command injection vulnerability in the Web SSH feature allows an authenticated attacker to execute arbitrary commands as root on the host. Zoraxy has a Web SSH terminal feature that allows …

  • High 8.8
    CVE-2024-41992 Public exploit

    Wi-Fi Alliance wfa_dut (in Wi-Fi Test Suite) through 9.0.0 allows OS command injection via 802.11x frames because the s…

  • High 8.1
    CVE-2024-10915 Public exploit Scanner template EPSS 83%

    D-Link DNS-320/DNS-320LW/DNS-325/DNS-340L account_mgr.cgi cgi_user_add os command injection

    A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been rated as critical. Affected by this issue is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation of the argu…

  • High 8.1
    CVE-2024-10914 Public exploit Scanner template EPSS 98%

    D-Link DNS-320/DNS-320LW/DNS-325/DNS-340L account_mgr.cgi cgi_user_add os command injection

    A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been declared as critical. Affected by this vulnerability is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation …

  • High 7.2
    CVE-2024-6333 Public exploit

    Authenticated Remote Code Execution in Altalink, Versalink & WorkCentre Products

    Authenticated Remote Code Execution in Altalink, Versalink & WorkCentre Products.

  • High 7.3
    CVE-2024-21532 Public exploit

    ggit is vulnerable to Command Injection via the fetchTags(branch) API

    All versions of the package ggit are vulnerable to Command Injection via the fetchTags(branch) API, which allows user input to specify the branch to be fetched and then concatenates this string along with a git command which is then passed to the unsafe exec(…

  • High 8.5
    CVE-2024-9054 Public exploit EPSS 16%

    Remote code Execution inTimeProvider® 4100

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Microchip TimeProvider 4100 (Configuration modules) allows Command Injection.This issue aff…

  • High 8.0
    CVE-2024-46658 Public exploit EPSS 24%

    Syrotech SY-GOPON-8OLT-L3 v1.6.0_240629 was discovered to contain an authenticated command injection vulnerability.

  • High 7.2
    CVE-2024-8190 Exploited Public exploit EPSS 89%

    An OS command injection vulnerability in Ivanti Cloud Services Appliance versions 4.6 Patch 518 and before allows a rem…

    KEV Sep 13, 2024
  • High 8.8
    CVE-2024-8504 Public exploit EPSS 76%

    VICIdial Authenticated Remote Code Execution

    An attacker with authenticated access to VICIdial as an "agent" can execute arbitrary shell commands as the "root" user. This attack can be chained with CVE-2024-8503 to execute arbitrary shell commands starting from an unauthenticated perspective.