bitesser MySQL Commander 2.7及更早版本在实现上存在远程文件包含漏洞,可发送特制的URL请求到 ressourcen/dbopen.php 脚本,使用"home"参数指定远程系统上的恶意文件,导致在有漏洞的服务器上执行任意代码。
存在漏洞的代码如下,可见include语句中的$home并没有被正确验证/过滤。
----------------ressourcen/dbopen.php-------------------
<?php
include $home."ressourcen/class.systemObject.php";
include $home."ressourcen/class.DatabaseMysql.php";
$db = new DatabaseMysql($config->dbuser[$_SESSION['which_db']], $config->dbpass[$_SESSION['which_db']],
$config->dbserver[$_SESSION['which_db']]);
$ok = $db->init();
if (!$ok and $db->error and (strlen($config->dbserver[1]) > 0)) {
echo $db->getError();
}