Vesta CP 0.9.8–20 rXSS to RCE / solves #1558

This commit is contained in:
Serghey Rodin 2018-05-11 16:17:23 +03:00
commit dd2a57e408
2 changed files with 6 additions and 31 deletions

View file

@ -16,7 +16,7 @@ if (!empty($_REQUEST['path'])) {
$path = $_REQUEST['path'];
if (!empty($_REQUEST['raw'])) {
header('content-type: image/jpeg');
passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($_REQUEST['path']));
passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg(htmlspecialchars($_REQUEST['path'], ENT_QUOTES, 'UTF-8')));
exit;
}
}