
| Campo | Dettagli |
|---|---|
| ID CVE | CVE-2026-48030 |
| Prodotto | pheditor |
| Fornitore | Hamid Samak |
| Versioni interessate | 2.0.1, 2.0.2, 2.0.3 |
| Versione corretta | 2.0.4 |
| Gravità | Critica |
| Punteggio CVSS | 9.9 |
| Vettore CVSS | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| CWE | CWE-78 (OS Command Injection) |
| Scoperta da | Muslimbek Burxonov |
Esiste una vulnerabilità critica di OS Command Injection nel gestore dell'azione
terminal di pheditor.php. Il parametro POST dir viene concatenato direttamente
in shell_exec() senza sanificazione, consentendo a un utente autenticato
di bypassare la whitelist TERMINAL_COMMANDS ed eseguire comandi arbitrari del sistema operativo.
pheditor.php, riga 586:
$command = $_POST['command']; // ✓ metacharacters checked
$dir = $_POST['dir']; // ✗ NOT checked — vulnerable
// Check applies to $command only, NOT $dir
if (strpos($command, '&') !== false ||
strpos($command, ';') !== false ||
strpos($command, '||') !== false) {
die(...);
}
// $dir injected unsanitized into shell_exec
$output = shell_exec(
(empty($dir) ? null : 'cd ' . $dir . ' && ')
. $command . ' && echo \ ; pwd'
);
python3 poc.py --target http://TARGET/pheditor.php --password admin
Vedi poc.py per lo script PoC completo.
pheditor.php, riga 586 — sostituire:
// BEFORE (vulnerable)
'cd ' . $dir
// AFTER (patched)
'cd ' . escapeshellarg($dir)
Questo PoC è fornito esclusivamente a scopo didattico e di ricerca. Utilizzalo solo su sistemi su cui hai esplicita autorizzazione a testare.