discuz!6.x/7.x存在sql注入
問(wèn)題出在 editpost.inc.php的281行舱殿,對(duì)用戶提交的polloption數(shù)組直接解析出來(lái)帶入SQL語(yǔ)句奥裸,因?yàn)槟J(rèn)只對(duì)數(shù)組值過(guò)濾,而不過(guò)濾鍵沪袭,所以會(huì)導(dǎo)致一個(gè)DELETE注入湾宙。
$pollarray['options']=$polloption;
if($pollarray['options']){
if(count($pollarray['options'])>$maxpolloptions)
{showmessage('post_poll_option_toomany');}
foreach($pollarray['options']as$key=>$value){//這里直接解析出來(lái)沒處理$key
if(!trim($value)){
$db->query("DELETE FROM {$tablepre}polloptions WHERE polloptionid='$key' AND tid='$tid'");unset($pollarray['options'][$key]);}}
DELETE注入:
可以利用updatexml報(bào)錯(cuò)注入,如:
利用extractvalue報(bào)錯(cuò)