๐ป Code Review
๐ Daily Cyber Challenge
Friday, 7 August 2026 ยท Challenge #219
๐ฅ
0
Day streak
0
Solved
0
Best streak
PHP Web Shell
<?php
// admin/execute.php
$cmd = $_GET["command"];
$output = shell_exec($cmd);
echo "<pre>" . $output . "</pre>";
?>
What critical vulnerability exists in this code?
60s
Attempts:
+3
points
โ
Correct!
OS Command Injection (CWE-78): shell_exec() runs any command from the GET parameter. Payload: ?command=id;cat+/etc/passwd gives full server access. Fix: never pass user input to shell functions.
CWE-78 / OWASP A03