Home / Vulnerability Database / C or C++ : Command injection
C/C++
C or C++ : Command injection
Classification
OWASP Top 10 2013
OWASP Top 10 2017
OWASP Top 10 2021
OWASP ASVS
PCI DSS 4.0
CWE/SANS Top 25 2011
Overview
Executing commands obtained from data from an untrusted source is insecure.
Injection vulnerabilities take the first place in the “OWASP Top 10 2017” web-application vulnerabilities ranking. Command injection vulnerabilities are divided into two categories:
- An attacker modifies the command itself;
- An attacker replaces the value of the environment variables, which implicitly changes the semantics of the command being executed.
In the given case, the application is prone to the vulnerability of the first type.
A possible attack scenario:
- The application receives input data from an untrusted source, for example, user input.
- The data obtained is used as a part of the string that defines the command.
- Execution of the command gives an attacker the privileges which he did not previously possess.
References
- OWASP Top 10 2017-A1-Injection
- OWASP Top 10 2013-A1-Injection
- CWE-77: Improper Neutralization of Special Elements used in a Command (‘Command Injection’)
- CWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
- CWE CATEGORY: OWASP Top Ten 2017 Category A1 - Injection
MEDIUM
DerScanner Severity Score
Do you want to fix C or C++ : Command injection in your application?
See also
C/C++
C or C++ : Dead store
C/C++
C or C++ : Use after free
C/C++
