CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
low-riskThe 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.
Common Consequences
Detection Methods
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Real-World Examples (10)
| CVE | CVSS | EPSS | KEV |
|---|---|---|---|
| CVE-2024-21887 | 9.1 | 94.4% | Y |
| CVE-2024-21887 | 9.1 | 94.4% | Y |
| CVE-2024-3273 | 7.3 | 94.4% | Y |
| CVE-2012-1823 | 9.8 | 94.4% | Y |
| CVE-2012-1823 | 9.8 | 94.4% | Y |
| CVE-2016-1555 | 9.8 | 94.3% | Y |
| CVE-2016-1555 | 9.8 | 94.3% | Y |
| CVE-2024-3400 | 10.0 | 94.3% | Y |
| CVE-2024-3400 | 10.0 | 94.3% | Y |
| CVE-2023-1671 | 9.8 | 94.3% | Y |