cmseasy 后台csrf缓存配置文件可导致getshell(2)

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

### 简要描述: cmseasy 管理员身份 后台缓存配置文件,没有过滤一个字符导致getshell(2) ### 详细说明: 直接到: [<img src="https://images.seebug.org/upload/201409/1015371863c172f309cfab357de41a81ee417eca.png" alt="28.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/1015371863c172f309cfab357de41a81ee417eca.png) 然后我们分析代码: website_admin.php:(lines:25-43): ``` function editwebsite_action() { chkpw('website_edit'); if (front::post('submit')) { $var = front::$post; $path = ROOT.'/config/website/'.front::$post['path'].'.php'; $contenttmp = file_get_contents(ROOT.'/config/config.example.php'); if (is_array($var)) foreach ($var as $key=>$value) { $value=str_replace("'","\'",$value); $contenttmp=preg_replace("%(\'$key\'=>)\'.*?\'(,\s*//)%i","$1'$value'$2",$contenttmp); } @file_put_contents($path,$contenttmp); //echo '<script type="text/javascript">alert("操作完成!")</script>'; front::refresh(url('website/listwebsite',true)); } $path = ROOT.'/config/website/'.front::$get['id'].'.php'; $datatmp...

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