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.8
    CVE-2026-49492 Public exploit

    Markdown Preview Enhanced OS Command Injection in External File and Link Opening

    Markdown Preview Enhanced before 0.8.28 opens external files and links from the preview through a shell and does not validate untrusted inputs taken from the markdown document - the diagram filename attribute, imported file paths, and the latex_engine code-ch…

  • High 8.9
    CVE-2026-9560 Public exploit

    Privilege escalation via background service of OpenVPN Connect 3.5.1 through 3.8.1 on macOS allows attackers to execute…

  • High 8.1
    CVE-2026-9277 Public exploit

    shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`

    shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`. The `.op` field was backslash-escaped character by character using `/(.)/g`, which in JavaScript does not match line terminators (\n, \r, U+202…

  • High 8.0
    CVE-2026-4802 Public exploit

    Cockpit: cockpit: arbitrary command execution via crafted links in system logs ui

    A flaw was found in Cockpit. This vulnerability allows a remote attacker to achieve arbitrary command execution on the host by exploiting unsanitized user-controlled parameters within crafted links in the system logs user interface (UI). An attacker can injec…

  • High 8.7
    CVE-2026-42271 Exploited Public exploit Scanner template EPSS 91%

    LiteLLM: Authenticated command execution via MCP stdio test endpoints

    LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/lis…

    KEV Jun 8, 2026
  • High 8.8
    CVE-2026-41900 Public exploit

    OpenLearnX has Critical Remote Code Execution Through Python Sandbox Escape via Code Execution Environment

    OpenLearnX is an open-source, decentralized learning and assessment platform. Prior to version 2.0.3, a remote code execution (RCE) vulnerability was identified in the OpenLearnX code execution environment, allowing sandbox escape and arbitrary command execut…

  • High 7.3
    CVE-2025-67888 Public exploit

    An issue was discovered in Control Web Panel (CWP) before 0.9.8.1209. User input passed via the "key" GET parameter to …

  • High 7.2
    CVE-2026-6992 Public exploit

    Linksys MR9600 JNAP Action run_central2.sh BTRequestGetSmartConnectStatus os command injection

    A vulnerability was identified in Linksys MR9600 2.0.6.206937. This affects the function BTRequestGetSmartConnectStatus of the file /etc/init.d/run_central2.sh of the component JNAP Action Handler. The manipulation of the argument pin leads to os command inje…

  • High 8.8
    CVE-2026-40261 Public exploit

    Composer has Command Injection via Malicious Perforce Reference

    Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::syncCodeBase() method, which appends the $sourceReference parameter to a shell command without proper escapi…

  • High 7.8
    CVE-2026-40176 Public exploit

    Composer is vulnerable to Command Injection via Malicious Perforce Repository

    Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::generateP4Command() method, which constructs shell commands by interpolating user-supplied Perforce connecti…

  • High 8.8
    CVE-2026-35196 Public exploit

    Chamilo LMS has OS Command Injection via export_all_certificates action

    Chamilo LMS is an open-source learning management system. In versions prior to 2.0.0-RC.3, an OS Command Injection vulnerability exists in the main/inc/ajax/gradebook.ajax.php endpoint within the export_all_certificates action, where the course code retrieved…

  • High 7.5
    CVE-2026-35585 Public exploit

    File Browser has a Command Injection via Hook Runner

    File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. From 2.0.0 until 2.33.8, the hook system in File Browser — which executes administrator-defined shell commands on file eve…

  • High 8.8
    CVE-2026-35517 Public exploit

    Pi-hole FTL affected by Remote Code Execution (RCE) via dns.upstreams Newline Injection

    FTLDNS (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole's Web interface. From 6.0 to before 6.6, the Pi-hole FTL engine contains a Remote Code Execution (RCE) vulnerability in the upstream DNS servers configuration parameter …

  • High 8.8
    CVE-2026-34197 Exploited Public exploit Scanner template EPSS 98%

    Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ: Authenticated users could perform RCE via Jolokia MBeans

    Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ. Apache ActiveMQ Classic exposes the Jolokia JMX-HTTP bridge at /api/jolokia/ on the web console. The default Jolokia…

    KEV Apr 16, 2026
  • High 8.7
    CVE-2026-34940 Public exploit

    KubeAI has an OS Command Injection via Model URL in Ollama Engine startup probe allows arbitrary command execution in model pods

    KubeAI is an AI inference operator for kubernetes. Prior to 0.23.2, the ollamaStartupProbeScript() function in internal/modelcontroller/engine_ollama.go constructs a shell command string using fmt.Sprintf with unsanitized model URL components (ref, modelParam…

  • High 8.7
    CVE-2026-28797 Public exploit

    RAGFlow: Server-Side Template Injection (SSTI) leading to Remote Code Execution (RCE) in Agent "Text Processing" Component

    RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. In versions 0.24.0 and prior, a Server-Side Template Injection (SSTI) vulnerability exists in RAGFlow's Agent workflow Text Processing (StringTransform) and Message components. These compo…

  • High 7.8
    CVE-2026-33641 Public exploit

    Glances Vulnerable to Command Injection via Dynamic Configuration Values

    Glances is an open-source system cross-platform monitoring tool. Prior to version 4.5.3, Glances supports dynamic configuration values in which substrings enclosed in backticks are executed as system commands during configuration parsing. This behavior occurs…

  • High 8.8
    CVE-2026-34005 Public exploit

    In Sofia on Xiongmai DVR/NVR (AHB7008T-MH-V2 and NBD7024H-P) 4.03.R11 devices, root OS command injection can occur via …

  • High 7.6
    CVE-2026-33718 Public exploit

    OpenHands is Vulnerable to Command Injection through its Git Diff Handler

    OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversatio…

  • High 8.0
    CVE-2026-1961 Public exploit

    Forman: foreman: remote code execution via command injection in websocket proxy

    A flaw was found in Foreman. A remote attacker could exploit a command injection vulnerability in Foreman's WebSocket proxy implementation. This vulnerability arises from the system's use of unsanitized hostname values from compute resource providers when con…

  • High 8.8
    CVE-2026-33310 Public exploit

    Intake has a Command Injection via shell() Expansion in Parameter Defaults

    Intake is a package for finding, investigating, loading and disseminating data. Prior to version 2.0.9, the shell() syntax within parameter default values appears to be automatically expanded during the catalog parsing process. If a catalog contains a paramet…

  • High 7.5
    CVE-2026-33154 Public exploit

    dynaconf Affected by Remote Code Execution (RCE) via Insecure Template Evaluation in @jinja Resolver

    dynaconf is a configuration management tool for Python. Prior to version 3.2.13, Dynaconf is vulnerable to Server-Side Template Injection (SSTI) due to unsafe template evaluation in the @Jinja resolver. When the jinja2 package is installed, Dynaconf evaluates…

  • High 8.5
    CVE-2026-3227 Public exploit

    Authenticated Command Injection on TP-Link TL-WR802N, TL-WR841N and TL-WR840N

    A command injection vulnerability was identified in TP-Link TL-WR802N v4, TL-WR841N v14, and TL-WR840N v6 due to improper neutralization of special elements used in an OS command. In the router configuration import function allows an authenticated attacker to…

  • High 7.7
    CVE-2026-27938 Public exploit

    WPGraphQL Repo Vulnerable to Command Injection via Unsanitized GitHub Actions Expression in Release Workflow

    WPGraphQL provides a GraphQL API for WordPress sites. Prior to version 2.9.1, the `wp-graphql/wp-graphql` repository contains a GitHub Actions workflow (`release.yml`) vulnerable to OS command injection through direct use of `${{ github.event.pull_request.bod…

  • High 7.2
    CVE-2026-1459 Public exploit

    A post-authentication command injection vulnerability in the TR-369 certificate download CGI program of the Zyxel VMG36…

  • High 8.8
    CVE-2026-26331 Public exploit

    yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option

    yt-dlp is a command-line audio/video downloader. Starting in version 2023.06.21 and prior to version 2026.02.21, when yt-dlp's `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter) is used, an attacker could achieve arbitrary command injecti…

  • High 7.2
    CVE-2026-2670 Public exploit EPSS 14%

    Advantech WISE-6610-NB Background Management openvpn_apply os command injection

    A vulnerability was identified in Advantech WISE-6610-NB, WISE-6610-EB, WISE-6610-TB, WISE-6610-JB, WISE-6610-CB, WISE-6610-EL-NB, WISE-6610-EL-EB, WISE-6610-EL-TB, WISE-6610-EL-JB, WISE-6610-EL-CB, WISE-6610P-DEA, WISE-6610P-DNA and WISE-6610P-DTA 1.2.1_2025…

  • High 8.8
    CVE-2025-70828 Public exploit

    An issue in Datart v1.0.0-rc.3 allows attackers to execute arbitrary code via the url parameter in the JDBC configurati…

  • High 7.1
    CVE-2025-11142 Public exploit

    The VAPIX API mediaclip.cgi that did not have a sufficient input validation allowing for a possible remote code executi…

  • High 8.6
    CVE-2026-25857 Public exploit

    Tenda G300-F Command Injection via formSetWanDiag

    Tenda G300-F router firmware version 16.01.14.2 and prior contain an OS command injection vulnerability in the WAN diagnostic functionality (formSetWanDiag). The implementation constructs a shell command that invokes curl and incorporates attacker-controlled …

  • High 7.8
    CVE-2026-25546 Public exploit

    Godot MCP is vulnerable to Command Injection via unsanitized projectPath

    Godot MCP is a Model Context Protocol (MCP) server for interacting with the Godot game engine. Prior to version 0.1.1, a command injection vulnerability in godot-mcp allows remote code execution. The executeOperation function passed user-controlled input (e.g…

  • High 8.5
    CVE-2026-22226 Public exploit

    Command Injection Vulnerability on TP-Link Archer BE230 and AX73

    A command injection vulnerability may be exploited after the admin's authentication in the VPN server configuration module on TP-Link Archer BE230 v1.2 and Archer AX73 v2. Successful exploitation could allow an attacker to gain full administrative control of …

  • High 8.0
    CVE-2025-9974 Public exploit

    Insufficient Input Validation on WEBUI in Nokia ONT/Beacon product

    The unified WEBUI application of the ONT/Beacon device contains an input handling flaw that allows authenticated users to trigger unintended system-level command execution. Due to insufficient validation of user-supplied data, a low-privileged authenticated a…

  • 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 8.8
    CVE-2025-12744 Public exploit

    Abrt: command-injection in abrt leading to local privilege escalation

    A flaw was found in the ABRT daemon’s handling of user-supplied mount information.ABRT copies up to 12 characters from an untrusted input and places them directly into a shell command (docker inspect %s) without proper validation. An unprivileged local user c…

  • High 8.6
    CVE-2025-34322 Public exploit

    Nagios Log Server < 2026R1.0.1 Authenticated Command Injection via Natural Language Queries

    Nagios Log Server versions prior to 2026R1.0.1 contain an authenticated command injection vulnerability in the experimental 'Natural Language Queries' feature. When this feature is configured, certain user-controlled settings—including model selection and con…

  • High 8.6
    CVE-2025-64328 Exploited Public exploit Scanner template EPSS 85%

    FreePBX Administration GUI is Vulnerable to Authenticated Command Injection

    FreePBX Endpoint Manager is a module for managing telephony endpoints in FreePBX systems. In versions 17.0.2.36 and above before 17.0.3, the filestore module within the Administrative interface is vulnerable to a post-authentication command injection by an au…

    KEV Feb 3, 2026
  • High 7.2
    CVE-2025-5946 Public exploit EPSS 14%

    RCE via the poller reload feature available only to user with high privilege

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in Centreon Infra Monitoring (Poller reload setup in the configuration modules) allows OS Command Injection. On the poller parameters page, a user with hi…

  • High 8.8
    CVE-2025-57457 Public exploit

    An OS Command Injection vulnerability in the Admin panel in Curo UC300 5.42.1.7.1.63R1 allows local attackers to inject…

  • High 7.2
    CVE-2025-60787 Public exploit EPSS 19%

    motionEye vulnerable to RCE via unsanitized motion config parameter

    MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve cod…