ThinkSNS第一弹 - SQL注入

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

### 简要描述: ThinkSNS漏洞系列第一弹,某处处理不当导致SQL注入 ### 详细说明: 漏洞点出现在Comment Widget里: \addons\widget\CommentWidget\CommentWidget.class.php:138 ``` /** * 添加评论的操作 * * @return array 评论添加状态和提示信息 */ public function addcomment() { // 返回结果集默认值 $return = array ( 'status' => 0, 'data' => L ( 'PUBLIC_CONCENT_IS_ERROR' ) ); // 获取接收数据 $data = $_POST; // 安全过滤 foreach ( $data as $key => $val ) { $data [$key] = t ( $data [$key] ); } // 评论所属与评论内容 $data ['app'] = $data ['app_name']; $data ['table'] = $data ['table_name']; $data ['content'] = h ( $data ['content'] ); // 判断资源是否被删除 $dao = M ( $data ['table'] ); $idField = $dao->getPk (); $map [$idField] = $data ['row_id']; $sourceInfo = $dao->where ( $map )->find (); if (! $sourceInfo) { $return ['status'] = 0; $return ['data'] = '内容已被删除,评论失败'; exit ( json_encode ( $return ) ); } ... ... ... ... ... ... // 添加评论操作 $data ['comment_id'] = model ( 'Comment' )->addComment ( $data ); if ($data ['comment_id']) { $return ['status'] = 1; $return ['data'] =...

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