PHPCMS v9.3.4 content.php SQL注入漏洞

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

PHPCMS全版本通杀SQL注入漏洞,测试版本为V9.5.3版本,2014-05-12之前的 存在漏洞的文件/phpcms/modules/member/content.php 202行 edit函数 ``` $info = array(); foreach($_POST['info'] as $_k=>$_v) { if(in_array($_k, $fields)) $_POST['info'][$_k] = new_html_special_chars(trim_script($_v)); } $_POST['linkurl'] = str_replace(array('"','(',')',",",' '),'',new_html_special_chars($_POST['linkurl'])); //exit(print_r($_POST['info'])); $this->content_db->edit_content($_POST['info'],$id); $_POST['info']传入的参数可控,现在要绕过单引号转义。 /caches/caches_model/caches_data/content_input.class.php 第102行 image函数没有正确过滤 function image($field, $value) { $value = str_replace(array("'",'"','(',')'),'',$value); return trim($value); ``` 过滤了"'"、"("、")",但是呢 我们知道当开启了GPC的时候,单引号会被转义 '-->\' 官方修复方案 ``` //修复前 v9.5.3 版本 function image($field, $value) { $value = str_replace(array("'",'"','(',')'),'',$value); return trim($value); } //修复后 最新版 v9.5.10 多了一个safe_replace函数去处理 function image($field, $value) { $value =...

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