74CMS include/common.fun.php 文件包含漏洞
文件 include/common.fun.php,有漏洞的 executioncrons 函数:
function execution_crons()
{
global $db;
$crons=$db->getone("select * from ".table('crons')." WHERE (nextrun<".time()." OR nextrun=0) AND available=1 LIMIT 1 ");
if (!empty($crons))
{
require_once(QISHI_ROOT_PATH."include/crons/".$crons['filename']);
}
}
executioncrons 函数直接从数据库里读取配置好的文件路径,未做任何判断就带入 requireonce 函数了。这个函数是后台的“计划任务”调用的,$crons['filename'] 对应的是脚本路径,所以可以在后台的计划任务里添加:
../../../../etc/passwd