漏洞详情

披露状态:

2014-01-14: 细节已通知厂商并且等待厂商处理中
2014-01-14: 厂商已经确认,细节仅向厂商公开
2014-01-17: 细节向第三方安全合作伙伴开放
2014-01-24: 细节向核心白帽子及相关领域专家公开
2014-02-03: 细节向普通白帽子公开
2014-02-23: 细节向实习白帽子公开
2014-04-14: 细节向公众公开

简要描述:

Dedecms 注入漏洞9

详细说明:

else if($action=='save')
{
if(!empty($_COOKIE['GUEST_BOOK_POS'])) $GUEST_BOOK_POS = $_COOKIE

['GUEST_BOOK_POS'];
else $GUEST_BOOK_POS = 'guestbook.php';
if(empty($validate)) $validate=='';
else $validate = strtolower($validate);
$svali = GetCkVdValue();
if($validate=='' || $validate!=$svali)
{
ShowMsg("验证码不正确!","");
exit();
}
$ip = GetIP();
$dtime = time();
$uname = trimMsg($uname);
$email = trimMsg($email);
$homepage = trimMsg($homepage);
$homepage = preg_replace("#http:\/\/#", '', $homepage);
$qq = trimMsg($qq);
$msg = trimMsg(cn_substrR($msg, 1024), 1);
$tid = empty($tid) ? 0 : intval($tid);
$reid = empty($reid) ? 0 : intval($reid);

if($msg=='' || $uname=='') {
showMsg('你的姓名和留言内容不能为空!','-1');
exit();
}
$title = HtmlReplace( cn_substrR($title,60), 1 );
if($title=='') $title = '无标题';

if($reid != 0)
{
$row = $dsql->GetOne("SELECT msg FROM `#@__guestbook` WHERE

id='$reid' ");
$msg = "<div class=\\'rebox\\'>".addslashes($row

['msg'])."</div>\n".$msg;
}

$query = "INSERT INTO `#@__guestbook`

(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck)
VALUES

('$title','$tid','{$g_mid}','$uname','$email','$homepage','$qq','$img','$ms

g','$ip','$dtime','$needCheck'); ";
echo $query;//img没有过滤
$dsql->ExecuteNoneQuery($query);
$gid = $dsql->GetLastID();

漏洞证明:

测试方法127.0.0.1/dede/plus/guestbook.php?



action=save&validate=scuf&msg=1&uname=1&img=111'

吧SCUF改成你自己的验证码就哦了 我就不写exp了。。我没安装留言~

1.png

修复方案:

你猜

版权声明:转载请注明来源 Matt@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:6

确认时间:2014-01-14 22:24

厂商回复:

已修复,感谢反馈

最新状态:

暂无


漏洞评价: