ThinkPHP3.2 框架sql注入漏洞

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

### 0x00 前言 ![](https://images.seebug.org/1535611471448) 北京时间 2018年8月23号11:25分 星期四,tp团队对于已经停止更新的thinkphp 3系列进行了一处安全更新,经过分析,此次更新修正了由于select(),find(),delete()方法可能会传入数组类型数据产生的多个sql注入隐患。 ### 0x01 漏洞复现 下载源码: git clone https://github.com/top-think/thinkphp.git 使用git checkout 命令将版本回退到上一次commit:git checkout 109bf30254a38651c21837633d9293a4065c300b 使用phpstudy等集成工具搭建thinkphp,修改apache的配置文件httpd-conf DocumentRoot "" 为thinkphp所在的目录。 ![](https://images.seebug.org/1535611493000) 重启phpstudy,访问127.0.0.1,输出thinkphp的欢迎信息,表示thinkphp已正常运行。 ![](https://images.seebug.org/1535611504301) 搭建数据库,数据库为tptest,表为user,表里面有三个字段id,username,pass ![](https://images.seebug.org/1535611519345) 修改Application\Common\Conf\config.php配置文件,添加数据库配置信息。 ![](https://images.seebug.org/1535611546994) 之后在Application\Home\Controller\IndexController.class.php 添加以下代码: ``` public function test() { $id = i('id'); $res = M('user')->find($id); //$res = M('user')->delete($id); //$res = M('user')->select($id); } ``` 针对select() 和find()方法...

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