Squamity/CVE-2026-8181-PoC
GitHub: Squamity/CVE-2026-8181-PoC
针对 WordPress Burst Statistics 插件身份验证绕过漏洞(CVE-2026-8181)的自动化 PoC 利用与检测缓解工具包。
Stars: 0 | Forks: 0
# 🚨 CVE-2026-8181 | Burst Statistics 身份验证绕过
[](https://nvd.nist.gov/vuln/detail/CVE-2026-8181)
[-brightgreen.svg?style=for-the-badge)](https://nvd.nist.gov/vuln/detail/CVE-2026-8181)
[](https://wordpress.org/plugins/burst-statistics/)
[](https://github.com/whattheslime/CVE-2026-8181)
[](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)
## 📑 目录
1. [执行摘要](#-executive-summary)
2. [🔬 深入剖析:根本原因分析](#-deep-dive-root-cause-analysis)
3. [⚔️ 攻击手册:漏洞利用](#️-offensive-playbook-exploitation)
4. [🛡️ 防御手册:检测与缓解](#️-defensive-playbook-detection--mitigation)
5. [🛠️ PoC 工具使用](#-poc-tool-usage)
6. [参考资料与免责声明](#-references--disclaimer)
## 📖 执行摘要
**CVE-2026-8181** 是一个严重的身份验证绕过漏洞,影响 **Burst Statistics** WordPress 插件(版本 `3.4.0` 至 `3.4.1.1`)。该缺陷存在于插件的 MainWP 代理集成中。由于在早期的 `plugins_loaded` hook 阶段对 application password 的验证不当,即使请求缺乏有效的凭证,插件也会错误地授予包含 `X-BurstMainWP: 1` 头的 REST API 请求管理员权限。
这会将一个简单的、未经身份验证的 HTTP 请求转化为完全的管理员接管,绕过所有标准的 WordPress 身份验证机制。
## 🔬 深入剖析:根本原因分析
为了理解一个简单的 header 如何获取系统的最高权限,我们必须剖析插件身份验证处理程序中的 PHP 逻辑。
### 漏洞逻辑流程
该漏洞源于 `includes/Frontend/class-mainwp-proxy.php` 中 `is_mainwp_authenticated()` 方法内一个处理不当的条件分支。
1. **触发点:** 插件在优先级为 `9` 的 `plugins_loaded` 钩子上注册了 `init()`。这在 WordPress 生命周期中**太早了**。
2. **钩子:** 当请求携带 `X-BurstMainWP: 1` header 时,`has_admin_access()` 会将身份验证委托给 `is_mainwp_authenticated()`。
3. **核心调用:** 该方法读取 `Authorization` header 并将凭证转发给 WordPress 核心的 `wp_authenticate_application_password()`。
4. **致命缺陷 (CWE-287):** 由于 REST API 尚未将 `application_password_is_api_request` filter 设置为 `true`(由于 hook 执行过早),核心函数返回 **`null`** 而不是 `WP_Error` 对象。
5. **绕过:** 插件仅检查 `is_wp_error( $user )`。由于 `null` **不是** `WP_Error`,守卫检查得以通过。
6. **接管:** 代码执行转入不安全的分支,使用攻击者提供的用户名调用 `wp_set_current_user()`,瞬间将请求提升为**完整的管理员上下文**。
### 伪代码表示
```
// Simplified representation of the vulnerable code in Burst Statistics <= 3.4.1.1
$user = wp_authenticate_application_password( null, $username, $password );
if ( is_wp_error( $user ) ) {
return false; // Correctly handles explicit authentication failures
}
// 🚨 THE FATAL FLAW 🚨
// If no application password is provided or API request isn't flagged yet,
// wp_authenticate_application_password returns NULL.
// The code fails to check for NULL!
if ( $user === null ) {
// Instead of failing securely, it falls through to this unsafe branch:
$admin_user = get_user_by( 'login', $attacker_supplied_username );
wp_set_current_user( $admin_user->ID ); // BOOM: Admin context granted!
return true;
}
```
## ⚔️ 攻击手册:漏洞利用
本节面向 **Red Teamers** 和**授权的渗透测试人员**。
### 攻击链
1. **侦察:** 确认目标运行的是 Burst Statistics <= 3.4.1.1(例如,通过 `/wp-content/plugins/burst-statistics/readme.txt`)。
2. **用户枚举:** 查找有效的管理员用户名。WordPress 的 REST API 经常通过 `GET /wp-json/wp/v2/users` 泄露这些信息。如果被拦截,可以使用作者归档技巧:`/?author=1`。
3. **载荷构建:** 构造一个 HTTP POST 请求来创建新用户:`POST /wp-json/wp/v2/users`。
4. **Header 注入:** 注入魔法的 header:
- `X-BurstMainWP: 1`
- `Authorization: Basic
由 Squamity 用 ❤️ 构建 | 为防御与攻击教育而维护
标签:CISA项目, PoC, WordPress, 安全, 暴力破解, 超时处理, 逆向工具