BUGTRAQ ID: 30381
IceBB是一个基于PHP+MySQL的开源论坛系统。
IceBB的modules/members.php文件没有正确地验证对username参数的输入便用在了SQL查询中:
$fleh = $icebb->input; <==
...
foreach($fleh as $k => $g)
{
...
$where_clauses[] = "{$k}='{$g}'"; <==
...
}
...
$this->qwhere = implode(' AND ',$where_clauses);
$total = $db->fetch_result("SELECT COUNT(*) as total FROM icebb_users{$this->qwhere}{$qextra}"); <==
这个查询中可以包含有更多的GET/POST输入,如$username和$url。如果设置username=\的话,则之后的句法会成为字符串的一部分,而下一个引号开始($url之前)会成为SQL。例如,
# GET /index.php?act=members&username=a\&url=OR+1#
会变为
# "SELECT COUNT(*) as total FROM icebb_users WHERE user_group='a\' AND username='OR 1#' AND id!=0 ORDER BY username ASC"
因此远程攻击者可以通过$username参数执行SQL注入攻击。
XAOS Interactive IceBB <= 1.0-RC9.2
XAOS Interactive
----------------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
<a href=http://icebb.net/ target=_blank>http://icebb.net/</a>
暂无评论