Skip to content
OpenAdvisories

Weakness (CWE)

CWE-77: Command Injection

Class Draft Improper Neutralization of Special Elements used in a Command

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

More detail

Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks.

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

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

  2. Implementation

    If possible, ensure that all external commands called from the program are statically created.

  3. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  4. Operation

    Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.

  5. System Configuration

    Assign permissions that prevent the user from accessing/opening privileged files.

Source: MITRE CWE-77

3,210 results · Feed

  • Medium 4.8

    Concrete CMS Cross-site Scripting vulnerability

    Concrete CMS (formerly concrete5) below 8.5.10 and between 9.0.0 and 9.1.2 is vulnerable to Stored Cross-Site Scripting (XSS) in dashboard/system/express/entities/associations because Concrete CMS allows association with an entity name that doesn’t exist or, …

  • Medium 6.3

    A vulnerability in the web management interface of the Cisco Firepower Management Center (FMC) Software could allow an …

  • Medium 6.3

    A vulnerability in the web management interface of the Cisco Firepower Management Center (FMC) Software could allow an …

  • Medium 6.0

    A vulnerability in the CLI of Cisco Firepower Threat Defense (FTD) Software and Cisco FXOS Software could allow an auth…

  • Critical 9.8

    D-Link DIR-823G v1.0.2 was found to contain a command injection vulnerability in the function SetNetworkTomographySetti…

  • Critical 9.8

    IP-COM EW9 V15.11.0.14(9732) was discovered to contain a command injection vulnerability in the formSetDebugCfg functio…

  • Critical 9.1

    An OS command injection vulnerability exists in the sysupgrade command injection functionality of Robustel R1510 3.1.16…

  • High 7.2

    BIG-IP Advanced WAF and ASM iControl REST vulnerability CVE-2022-41617

    In versions 16.1.x before 16.1.3.1, 15.1.x before 15.1.6.1, 14.1.x before 14.1.5.1, and 13.1.x before 13.1.5.1, When the Advanced WAF / ASM module is provisioned, an authenticated remote code execution vulnerability exists in the BIG-IP iControl REST interfac…

  • Critical 9.8
    CVE-2016-20017 Exploited Public exploit EPSS 66%

    D-Link DSL-2750B devices before 1.05 allow remote unauthenticated command injection via the login.cgi cli parameter, as…

    KEV Jan 8, 2024
  • Critical 9.8
    CVE-2022-24697 EPSS 85%

    Apache Kylin prior to 4.0.2 allows command injection when the configuration overwrites function overwrites system parameters

    Kylin's cube designer function has a command injection vulnerability when overwriting system parameters in the configuration overwrites menu. RCE can be implemented by closing the single quotation marks around the parameter value of “-- conf=” to inject any o…

  • High 8.8

    D-Link COVR 1200,1202,1203 v1.08 was discovered to contain a command injection vulnerability via the system_time_timezo…

  • High 8.8

    D-Link COVR 1200,1203 v1.08 was discovered to contain a command injection vulnerability via the tomography_ping_number …

  • High 7.8

    Powerline Gitstatus vulnerable to arbitrary code execution

    powerline-gitstatus (aka Powerline Gitstatus) before 1.3.2 allows arbitrary code execution. git repositories can contain per-repository configuration that changes the behavior of git, including running arbitrary commands. When using powerline-gitstatus, chang…

  • High 8.8

    D-Link COVR 1200,1202,1203 v1.08 was discovered to contain a command injection vulnerability via the /SetTriggerWPS/PIN…

  • Critical 9.8

    Array Networks AG/vxAG with ArrayOS AG before 9.4.0.469 allows unauthenticated command injection that leads to privileg…

  • High 7.3

    Dell Hybrid Client below 1.8 version contains a gedit vulnerability. A guest attacker could potentially exploit this vu…

  • Medium 5.5

    Cisco IOS XE Software Web UI Command Injection Vulnerability

    A vulnerability in the web UI feature of Cisco IOS XE Software could allow an authenticated, remote attacker to perform an injection attack against an affected device. This vulnerability is due to insufficient input validation. An attacker could exploit this …

  • High 7.2

    AP Manager in Innovaphone before 13r2 Service Release 17 allows command injection via a modified service ID during app …

  • High 8.4

    NuProcess vulnerable to command-line injection through insertion of NUL character(s)

    NuProcess is an external process execution implementation for Java. In all the versions of NuProcess where it forks processes by using the JVM's Java_java_lang_UNIXProcess_forkAndExec method (1.2.0+), attackers can use NUL characters in their strings to perfo…

  • Critical 9.8

    Tenda i9 v1.0.0.8(3828) was discovered to contain a command injection vulnerability via the FormexeCommand function.

  • High 7.2

    Vulnerabilities in the ClearPass Policy Manager web-based management interface allow remote authenticated users to run …

  • High 7.2

    Vulnerabilities in the ClearPass Policy Manager web-based management interface allow remote authenticated users to run …

  • High 7.2

    Vulnerabilities in the ClearPass Policy Manager web-based management interface allow remote authenticated users to run …

  • High 7.3
    CVE-2022-25765 Public exploit EPSS 43%

    Command Injection

    The package pdfkit from 0.0.0 are vulnerable to Command Injection where the URL is not properly sanitized.

  • High 7.5

    STARTTLS command injection in Apache JAMES

    Apache James prior to release 3.6.3 and 3.7.1 is vulnerable to a buffering attack relying on the use of the STARTTLS command. Fix of CVE-2021-38542, which solved similar problem fron Apache James 3.6.1, is subject to a parser differential and do not take into…

  • High 8.1

    Dell Edge Gateway 5200 (EGW) versions before 1.03.10 contain an operating system command injection vulnerability. A loc…

  • Critical 10.0

    iSTAR Ultra

    All versions of iSTAR Ultra prior to version 6.8.9.CU01 are vulnerable to a command injection that could allow an unauthenticated user root access to the system.

  • Critical 9.8

    Arbitrary Command Injection

    All versions of package font-converter are vulnerable to Arbitrary Command Injection due to missing sanitization of input that potentially flows into the child_process.exec() function.

  • Critical 9.9
    CVE-2022-2234 EPSS 42%

    mySCADA myPRO Command Injection

    An authenticated mySCADA myPRO 8.26.0 user may be able to modify parameters to run commands directly in the operating system.

  • High 8.8
    CVE-2022-36633 Public exploit EPSS 51%

    Improper token validation leading to code execution in Teleport

    Teleport 9.3.6 is vulnerable to Command injection leading to Remote Code Execution. An attacker can craft a malicious ssh agent installation link by URL encoding a bash escape with carriage return line feed. This url encoded payload can be used in place of a …

  • Medium 5.0

    Delimiter injection vulnerability in @actions/core exportVariable

    The GitHub Actions ToolKit provides a set of packages to make creating actions easier. The `core.exportVariable` function uses a well known delimiter that attackers can use to break out of that specific variable and assign values to other arbitrary variables.…

  • Medium 6.8

    A vulnerability has been identified in Teamcenter V12.4 (All versions < V12.4.0.15), Teamcenter V13.0 (All versions < V…

  • Medium 6.5

    In l2cble_process_sig_cmd of l2c_ble.cc, there is a possible out of bounds write due to a missing bounds check. This co…

  • Medium 4.6

    WAVLINK WN572HP3, WN533A8, WN530H4, WN535G3, WN531P3 nas.cgi has no filtering on parameters: User1Passwd and User1, whi…

  • Critical 9.8
    CVE-2022-21186 EPSS 26%

    Arbitrary Command Injection

    The package @acrontum/filesystem-template before 0.0.2 are vulnerable to Arbitrary Command Injection due to the fetchRepo API missing sanitization of the href field of external input.

  • Critical 9.8

    Command Injection

    This affects all versions of package monorepo-build.

  • High 7.3

    Command Injection

    This affects all versions of package curljs.

  • High 7.3

    Command Injection

    This affects all versions of package node-latex-pdf.

  • High 7.3

    Command Injection

    The package get-npm-package-version before 1.0.7 are vulnerable to Command Injection via main function in index.js.

  • Critical 9.4

    Command Injection

    This affects all versions of package gitblame. The injection point is located in line 15 in lib/gitblame.js.