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

49 results · Clear filters · Feed

  • Critical 9.8
    CVE-2026-116779 Exploited Public exploit

    FreeSWITCH: Inbound SIP MESSAGE can select the api chat proto and run FreeSWITCH API commands

    FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a software implementation that runs on any commodity hardware. Prior to 1.11.3, sofia_presence_handle_sip_i_message() split the To user of …

    KEV Nov 9, 2026
  • Critical 9.2
    CVE-2026-110447 Exploited Public exploit Scanner template EPSS 73%

    Collabora Online Built-in CODE Server before 26.4.303 (richdocumentscode), a Nextcloud app, allows remote code executio…

    KEV Oct 23, 2026
  • Critical 10.0
    CVE-2026-105134 Exploited Public exploit Scanner template EPSS 82%

    Ahsay AhsayCBS Replication Receiver UpdateReceivers.do os command injection

    A flaw has been found in Ahsay AhsayCBS up to 9.15.2.69/10.3.4.44. This vulnerability affects unknown code of the file /rps/api/json/UpdateReceivers.do of the component Replication Receiver. Executing a manipulation of the argument random can lead to os comma…

    KEV Oct 14, 2026
  • Critical 10.0
    CVE-2026-49869 Exploited Public exploit

    Kestra: Unauthenticated Remote Code Execution via Authentication Bypass in `AuthenticationFilter`

    Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, AuthenticationFilter in Kestra OSS uses request.getPath().endsWith("/configs") to whitelist the public configuration endpoint from Basic Auth. Because the check is a su…

    KEV Sep 2, 2026
  • Critical 9.1
    CVE-2026-25089 Exploited Public exploit EPSS 76%

    A improper neutralization of special elements used in an os command ('os command injection') vulnerability in Fortinet …

    KEV Jul 16, 2026
  • Critical 10.0
    CVE-2026-10520 Exploited Public exploit Scanner template EPSS 100%

    An OS Command Injection vulnerability in Ivanti Sentry before the R10.5.2, R10.6.2 and R10.7.1 versions allows a remote…

    KEV Jun 11, 2026
  • Critical 9.1
    CVE-2026-39808 Exploited Public exploit Scanner template EPSS 93%

    A improper neutralization of special elements used in an os command ('os command injection') vulnerability in Fortinet …

    KEV Jul 16, 2026
  • Critical 9.8
    CVE-2025-67038 Exploited Public exploit EPSS 21%

    Lantronix EDS5000, G520, and X300 OS Command Injection

    An issue was discovered in Lantronix EDS5000 2.1.0.0R3. The HTTP RPC module executes a shell command to write logs when user's authentication fails. The username is directly concatenated with the command without any sanitization. This allow attackers to injec…

    KEV Jun 23, 2026
  • Critical 9.9
    CVE-2026-1731 Exploited · Ransomware Public exploit Scanner template EPSS 94%

    Remote code execution vulnerability in BeyondTrust Remote Support (RS) and Privileged Remote Access (PRA)

    BeyondTrust Remote Support (RS) and certain older versions of Privileged Remote Access (PRA) contain a critical pre-authentication remote code execution vulnerability. By sending specially crafted requests, an unauthenticated remote attacker may be able to ex…

    KEV Feb 13, 2026
  • Critical 9.8
    CVE-2025-11953 Exploited Public exploit Scanner template EPSS 94%

    Command injection in React Native Community CLI allows remote attackers to perform remote code execution by sending HTTP requests

    The Metro Development Server, which is opened by the React Native Community CLI, binds to external interfaces by default. The server exposes an endpoint that is vulnerable to OS command injection. This allows unauthenticated network attackers to send a POST r…

    KEV Feb 5, 2026
  • Critical 9.0
    CVE-2025-48703 Exploited Public exploit Scanner template EPSS 100%

    CWP (aka Control Web Panel or CentOS Web Panel) before 0.9.8.1205 allows unauthenticated remote code execution via shel…

    KEV Nov 4, 2025
  • Critical 10.0
    CVE-2024-50603 Exploited Public exploit Scanner template EPSS 99%

    An issue was discovered in Aviatrix Controller before 7.1.4191 and 7.2.x before 7.2.4996. Due to the improper neutraliz…

    KEV Jan 16, 2025
  • Critical 9.3
    CVE-2024-56145 Exploited Public exploit Scanner template EPSS 97%

    RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms

    Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified…

    KEV Jun 2, 2025
  • Critical 10.0
    CVE-2024-51378 Exploited · Ransomware Public exploit Scanner template EPSS 95%

    getresetstatus in dns/views.py and ftp/views.py in CyberPanel (aka Cyber Panel) before 1c0c6cb allows remote attackers …

    KEV Dec 4, 2024
  • Critical 9.9
    CVE-2024-9463 Exploited Public exploit Scanner template EPSS 99%

    Expedition: Unauthenticated OS Command Injection Vulnerability Leads to Firewall Credential Disclosure

    An OS command injection vulnerability in Palo Alto Networks Expedition allows an unauthenticated attacker to run arbitrary OS commands as root in Expedition, resulting in disclosure of usernames, cleartext passwords, device configurations, and device API keys…

    KEV Nov 14, 2024
  • Critical 10.0
    CVE-2024-45519 Exploited Public exploit Scanner template EPSS 100%

    The postjournal service in Zimbra Collaboration (ZCS) before 8.8.15 Patch 46, 9 before 9.0.0 Patch 41, 10 before 10.0.9…

    KEV Oct 3, 2024
  • Critical 9.8
    CVE-2024-4577 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Argument Injection in PHP-CGI

    In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32…

    KEV Jun 12, 2024
  • Critical 10.0
    CVE-2024-1212 Exploited Public exploit Scanner template EPSS 95%

    LoadMaster Pre-Authenticated OS Command Injection

    Unauthenticated remote attackers can access the system through the LoadMaster management interface, enabling arbitrary system command execution.

    KEV Nov 18, 2024
  • Critical 9.8
    CVE-2023-43208 Exploited · Ransomware Public exploit Scanner template EPSS 86%

    NextGen Healthcare Mirth Connect before version 4.4.1 is vulnerable to unauthenticated remote code execution. Note that…

    KEV May 20, 2024
  • Critical 9.8
    CVE-2023-28771 Exploited Public exploit EPSS 99%

    Improper error message handling in Zyxel ZyWALL/USG series firmware versions 4.60 through 4.73, VPN series firmware ver…

    KEV May 31, 2023
  • Critical 9.8
    CVE-2022-44877 Exploited Public exploit Scanner template EPSS 100%

    login/index.php in CWP (aka Control Web Panel or CentOS Web Panel) 7 before 0.9.8.1147 allows remote attackers to execu…

    KEV Jan 17, 2023
  • Critical 9.8
    CVE-2022-29303 Exploited Public exploit Scanner template EPSS 98%

    SolarView Compact ver.6.00 was discovered to contain a command injection vulnerability via conf_mail.php.

    KEV Jul 13, 2023
  • Critical 9.8
    CVE-2022-30525 Exploited Public exploit Scanner template EPSS 100%

    A OS command injection vulnerability in the CGI program of Zyxel USG FLEX 100(W) firmware versions 5.00 through 5.21 Pa…

    KEV May 16, 2022
  • Critical 9.8
    CVE-2021-36260 Exploited Public exploit Scanner template EPSS 100%

    A command injection vulnerability in the web server of some Hikvision product. Due to the insufficient input validation…

    KEV Jan 10, 2022
  • Critical 9.8
    CVE-2021-1498 Exploited Public exploit Scanner template EPSS 100%

    Cisco HyperFlex HX Command Injection Vulnerabilities

    Multiple vulnerabilities in the web-based management interface of Cisco HyperFlex HX could allow an unauthenticated, remote attacker to perform command injection attacks against an affected device. For more information about these vulnerabilities, see the Det…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2021-1497 Exploited Public exploit Scanner template EPSS 100%

    Cisco HyperFlex HX Command Injection Vulnerabilities

    Multiple vulnerabilities in the web-based management interface of Cisco HyperFlex HX could allow an unauthenticated, remote attacker to perform command injection attacks against an affected device. For more information about these vulnerabilities, see the Det…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2020-2509 Exploited Public exploit EPSS 34%

    Command Injection Vulnerability in QTS and QuTS hero

    A command injection vulnerability has been reported to affect QTS and QuTS hero. If exploited, this vulnerability allows attackers to execute arbitrary commands in a compromised application. We have already fixed this vulnerability in the following versions: …

    KEV Apr 11, 2022
  • Critical 9.8
    CVE-2021-22502 Exploited Public exploit Scanner template EPSS 97%

    Remote Code execution vulnerability in Micro Focus Operation Bridge Reporter (OBR) product, affecting version 10.40. Th…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2020-16846 Exploited Public exploit Scanner template EPSS 100%

    SaltStack Salt Command Injection in netapi ssh client

    An issue was discovered in SaltStack Salt through 3002. Sending crafted web requests to the Salt API, with the SSH client enabled, can result in shell injection.

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2020-25223 Exploited Public exploit Scanner template EPSS 97%

    A remote code execution vulnerability exists in the WebAdmin of Sophos SG UTM before v9.705 MR5, v9.607 MR7, and v9.511…

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2020-10987 Exploited Public exploit Scanner template EPSS 80%

    The goform/setUsbUnload endpoint of Tenda AC15 AC1900 version 15.03.05.19 allows remote attackers to execute arbitrary …

    KEV Nov 3, 2021
  • Critical 9.1
    CVE-2020-8816 Exploited Public exploit EPSS 78%

    Pi-hole Web v4.3.2 (aka AdminLTE) allows Remote Code Execution by privileged dashboard users via a crafted DHCP static …

    KEV Dec 10, 2021
  • Critical 9.1
    CVE-2020-4428 Exploited Public exploit EPSS 62%

    IBM Data Risk Manager 2.0.1, 2.0.2, 2.0.3, and 2.0.4 could allow a remote authenticated attacker to execute arbitrary c…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2020-12641 Exploited Public exploit Scanner template EPSS 84%

    rcube_image.php in Roundcube Webmail before 1.4.4 allows attackers to execute arbitrary code via shell metacharacters i…

    KEV Jun 22, 2023
  • Critical 9.8
    CVE-2020-9054 Exploited Public exploit Scanner template EPSS 100%

    ZyXEL NAS products running firmware version 5.21 and earlier are vulnerable to pre-authentication command injection in weblogin.cgi

    Multiple ZyXEL network-attached storage (NAS) devices running firmware version 5.21 contain a pre-authentication command injection vulnerability, which may allow a remote, unauthenticated attacker to execute arbitrary code on a vulnerable device. ZyXEL NAS de…

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2020-8515 Exploited Public exploit Scanner template EPSS 100%

    DrayTek Vigor2960 1.3.1_Beta, Vigor3900 1.4.4_Beta, and Vigor300B 1.3.3_Beta, 1.4.2.1_Beta, and 1.4.4_Beta devices allo…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2019-17621 Exploited Public exploit EPSS 91%

    The UPnP endpoint URL /gena.cgi in the D-Link DIR-859 Wi-Fi router 1.05 and 1.06B01 Beta01 allows an Unauthenticated re…

    KEV Jun 29, 2023
  • Critical 9.9
    CVE-2019-10758 Exploited Public exploit Scanner template EPSS 85%

    Remote Code Execution Vulnerability in NPM mongo-express

    mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.

    KEV Dec 10, 2021
  • Critical 9.8
    CVE-2019-16920 Exploited Public exploit Scanner template EPSS 100%

    Unauthenticated remote code execution occurs in D-Link products such as DIR-655C, DIR-866L, DIR-652, and DHP-1565. The …

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2019-15107 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    An issue was discovered in Webmin <=1.920. The parameter old in password_change.cgi contains a command injection vulner…

    KEV Mar 25, 2022