PHPCMS V9 版本后台设计缺陷导致任意代码执行漏洞

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

来源链接:http://www.cnbraid.com/ ### 0x01 背景 由于默认安装后需要超级管理员权限,故该漏洞很鸡肋,但感觉应该会在其它cms中也存在,所以主要分享下挖掘思路~ PS:使用的测试环境是php5.6(已经移除gpc选项) ![](http://7xk8bu.com1.z0.glb.clouddn.com/pshell.jpg) ### 0x02 漏洞分析 漏洞起源: yoursite\phpsso_server\phpcms\modules\admin\system.php下的uc函数: ``` <?php public function uc() { if (isset($_POST['dosubmit'])) { $data = isset($_POST['data']) ? $_POST['data'] : ''; $data['ucuse'] = isset($_POST['ucuse']) && intval($_POST['ucuse']) ? intval($_POST['ucuse']) : 0; $filepath = CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.'system.php'; $config = include $filepath; $uc_config = '<?php '."\ndefine('UC_CONNECT', 'mysql');\n"; foreach ($data as $k => $v) { $old[] = "'$k'=>'".(isset($config[$k]) ? $config[$k] : $v)."',"; $new[] = "'$k'=>'$v',"; $uc_config .= "define('".strtoupper($k)."', '$v');\n"; } $html = file_get_contents($filepath); $html = str_replace($old, $new, $html); $uc_config_filepath = CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.'uc_config.php';...

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