当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-058372

漏洞标题:phpyun某功能对参数处理不严可导致sql注入

相关厂商:php云人才系统

漏洞作者: 啊L川

提交时间:2014-05-07 10:41

修复时间:2014-06-21 10:41

公开时间:2014-06-21 10:41

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-05-07: 细节已通知厂商并且等待厂商处理中
2014-05-07: 厂商已经确认,细节仅向厂商公开
2014-05-17: 细节向核心白帽子及相关领域专家公开
2014-05-27: 细节向普通白帽子公开
2014-06-06: 细节向实习白帽子公开
2014-06-21: 细节向公众公开

简要描述:

学习中......少装不努力,老大搞IT!!!

详细说明:

phpyun 个人会员中心
member/model/index.class.php
$_COOKIE["usertype"];参数存在注入,
从下面代码中可以看到$data["usertype"] 直接读取COOKIE的值,带入到sql中,
sql未对值进行过滤处理

function msg_action(){
if($_GET["del"]){
$nid=$this->obj->DB_delete_all("userid_msg","`id`='".$_GET["del"]."' and `uid`='".$this->uid."'");
isset($nid)?$this->obj->ACT_msg("index.php?C=msg","删除成功"):$this->obj->ACT_msg("index.php?C=msg","删除失败");
}
$this->public_action();
$urlarr=array("C"=>"msg","page"=>"{{page}}");
$pageurl=$this->url("index","index",$urlarr);
$this->get_page("userid_msg","`uid`='".$this->uid."' and type!='1' order by id desc",$pageurl,"20");
if($_GET["c_uid"]){
$data["c_uid"]=$_GET["c_uid"];
$data["inputtime"]=mktime();
$data["p_uid"]=$_COOKIE["uid"];
$data["usertype"]=$_COOKIE["usertype"];
$data["com_name"]=$_GET["c_name"];
$haves=$this->obj->DB_select_once("blacklist","`p_uid`=".$data["p_uid"]." and `c_uid`=".$data["c_uid"]." and `usertype`=".$data["usertype"]."");
if(is_array($haves)){
$this->obj->ACT_msg($_SERVER['HTTP_REFERER'],"该用户已在您黑名单中");
}else{
$nid=$this->obj->insert_into("blacklist",$data);
$this->obj->DB_delete_all("userid_msg","`uid`=".$data["p_uid"]." and `fid`=".$data["c_uid"].""," ");
$nid?$this->obj->ACT_msg($_SERVER['HTTP_REFERER'],"操作成功"):$this->obj->ACT_msg($_SERVER['HTTP_REFERER'],"操作失败");
}
}


function DB_select_once($tablename, $where = 1, $select = "*") {
$cachename=$tablename.$where;
if(!$return=$this->Memcache_set($cachename)){
$SQL = "SELECT ".$select." FROM " . $this->def . $tablename . " WHERE ".$where." limit 1";
echo $SQL;
$query = $this->db->query($SQL);
$return=$this->db->fetch_array($query);
$this->Memcache_set($cachename,$return);
}
return $return;
}


QQ截图20140425081528.png

漏洞证明:

修复方案:

版权声明:转载请注明来源 啊L川@乌云


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:5

确认时间:2014-05-07 11:23

厂商回复:

感谢您的支持,我们会尽快完善并修复!

最新状态:

暂无