Cyber Posture

CWE · MITRE source

CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Abstraction: Base · CVEs in our corpus: 5,694

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 when it is sent to a downstream component.

This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.

Last updated: 09 May 2026 03:25 UTC

NIST 800-53 r5 controls that address this weakness (2)AI

Control Title Family Why it addresses this CWE
SC-27Platform-independent ApplicationsSCPlatform-independent apps typically execute inside a managed runtime or sandbox that restricts direct OS command execution, reducing the ability to exploit OS command injection.
SI-10Information Input ValidationSIValidates inputs to block special elements that would alter OS command execution.

Top CVEs of this weakness type, ranked by Risk Priority

CVE Risk CVSS EPSS Published
CVE-2024-1212 KEV9.710.00.94302024-02-21
CVE-2024-50603 KEV9.710.00.94362025-01-08
CVE-2014-6271 KEV9.69.80.94222014-09-24
CVE-2018-6530 KEV9.69.80.94292018-03-06
CVE-2018-10562 KEV9.69.80.94032018-05-04
CVE-2018-11138 KEV9.69.80.93442018-05-31
CVE-2018-14933 KEV9.69.80.93872018-08-04
CVE-2019-3929 KEV9.69.80.94252019-04-30
CVE-2017-18368 KEV9.69.80.93592019-05-02
CVE-2019-10149 KEV9.69.80.93922019-06-05
CVE-2019-7256 KEV9.69.80.94402019-07-02
CVE-2019-15107 KEV9.69.80.94462019-08-16
CVE-2019-16057 KEV9.69.80.94052019-09-16
CVE-2019-16920 KEV9.69.80.94342019-09-27
CVE-2020-7247 KEV9.69.80.94112020-01-29
CVE-2020-8515 KEV9.69.80.94362020-02-01
CVE-2020-9054 KEV9.69.80.94262020-03-04
CVE-2020-10987 KEV9.69.80.93682020-07-13
CVE-2020-25223 KEV9.69.80.94232020-09-25
CVE-2020-16846 KEV9.69.80.94392020-11-06
CVE-2020-25506 KEV9.69.80.94292021-02-02
CVE-2021-22502 KEV9.69.80.93762021-02-08
CVE-2021-1497 KEV9.69.80.94362021-05-06
CVE-2021-1498 KEV9.69.80.94212021-05-06
CVE-2021-36380 KEV9.69.80.93642021-08-13