漏洞详情

披露状态:

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

简要描述:

看到厂商迟迟不确认,所以再来一发,难不成厂商已经放假了?如果是开年求收留!

详细说明:

问题发生在 wap模块

apps/wap/Lib/Action/IndexAction.class.php



apps/w3g/Lib/Action/IndexAction.class.php

行665

public function doDelete() {
$weibo_id = intval($_GET['weibo_id']);
if ($weibo_id <= 0) {
redirect(U('wap/Index/index', 3, '参数错误'));
}
if ( !in_array($_GET['from'], array('index','weibo','doSearch','atMe','favorite')) ) {
$_GET['from'] = 'index';
}

$target = U('wap/Index/'.$_GET['from'], array('key'=>urlencode($_GET['key']),'page'=>$_GET['page']));
$data['id'] = $weibo_id;
$detail = api('WeiboStatuses')->data($data)->show();
$data['source_table_name'] = $detail['app_row_table'];

$res = api('WeiboStatuses')->data($data)->destroy();
if ($res) {
redirect($target , 1, '删除成功');
}else {
redirect($target, 3, '删除失败,请稍后重试');
}
}



这里没有判断身份就直接del了!



这个文件还有

public function doUnFavorite() {

$weibo_id = intval($_GET['weibo_id']);
if ($weibo_id <= 0) {
redirect(U('wap/Index/index', 3, '参数错误'));
}
if ( !in_array($_GET['from'], array('index','detail','weibo','doSearch','atMe','favorite')) ) {
$_GET['from'] = 'index';
}
$_GET['key'] = urlencode($_GET['key']);
$target = U('wap/Index/'.$_GET['from'], array('weibo_id'=>$weibo_id, 'key'=>$_GET['key'],'page'=>$_GET['page']));

$data['id'] = $weibo_id;
// $res = api('Favorites')->data($data)->destroy();
$res = model('Collection')->delCollection($data['id'],'feed');
if ($res) {
redirect($target, 1, '取消成功');
}else {
redirect($target, 3, '取消失败,请稍后重试');
}
}





接着

w3g模块的收藏删除功能也没有权限判断

public function doUnFavorite() {
$type = empty($_POST['type'])?$type='feed':$type=$_POST['type'];
$weibo_id = intval($_POST['feed_id']);
if ($weibo_id <= 0) {
// redirect(U('w3g/Index/index', 3, '参数错误'));
echo '参数错误';
exit();
}
$data['id'] = $weibo_id;
// $res = api('Favorites')->data($data)->destroy();
$res = model('Collection')->delCollection($data['id'],$type);
// dump($res);
if ($res) {
echo '1';
}else {
echo '0';
}
}

漏洞证明:

在登录状态下访问

http://xxxx/index.php?app=wap&mod=Index&act=doDelete&weibo_id=2&from=index&page=1



weibo_id=这里是要删除的微博ID号!

即可删除别人的微博!

修复方案:

这个功能在多个地方出现,为嘛总是要漏一些地方的权限啊?

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2014-01-21 14:35

厂商回复:

非常感谢这位认真的白帽,临近假期响应慢了!

最新状态:

暂无


漏洞评价: