CWE-77: Command Injection
4 real-world CVEs classified as CWE-77: Command Injection. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2024-3400critical 10.02024
PAN-OS GlobalProtect file-create to root command injection
An unauthenticated session cookie is used as a filename with no validation, so an attacker plants a root-owned file whose name carries shell metacharacters; an hourly telemetry job then embeds that filename in a shell command and executes it as root.
- CVE-2023-1389high 8.82023
TP-Link Archer locale command injection
An unauthenticated locale API places the country parameter inside a command string that firmware executes with popen as root.
- CVE-2016-3714high 8.42016
ImageTragick: command injection via image delegate
An image library hands unsupported formats to external helper programs, building each helper command from a template. Attacker-controlled tokens are substituted in with no shell-escaping and run through system(), so a crafted image executes commands.
- CVE-2012-1823critical 9.82012
PHP-CGI query-string argument injection
Under the CGI SAPI, a query string with no = character is delivered to php-cgi as command-line arguments, so URL-supplied options like -d reach PHP's option parser and turn into remote code execution.