
Proof-of-concept exploit for CVE-2026-41940, a critical cPanel & WHM authentication bypass via session-file CRLF injection, enabling automatic root login to WHM interface.
CVSS 10.0 (Critical) · Confirmed In‑The‑Wild · Auto Root Login
cPanelCVE is a proof‑of‑concept exploit for CVE-2026-41940, a critical session‑file CRLF injection vulnerability in cPanel & WHM that allows complete root authentication bypass on WHM (Web Host Manager) port 2087.
Once the bypass is successful, the tool automatically opens your browser (Chrome or Firefox) and logs you directly into the WHM interface as root — no manual cookie setup, no password, no click‑throughs.
The exploit runs in 4 stages:
After Stage 4, the tool either:
pip install selenium
pip install -r requirements.txt
# Auto‑login with Chrome (default)
python cpanelcve.py -u https://target.com:2087 --selenium
# Auto‑login with Firefox
python cpanelcve.py -u https://target.com:2087 --selenium --engine firefox
# Print manual browser console commands
python cpanelcve.py -u https://target.com:2087 --browser
Made with ❤️ by @mahanOFp
| Stage | Description |
|---|
| 0 — Canonical Discovery | Retrieves the real hostname via /openid_connect/cpanelid to prevent redirect loops. |
| 1 — Preauth Session | Posts wrong credentials to /login/?login_only=1 to obtain a whostmgrsession cookie. |
| 2 — CRLF Injection | Sends a poisoned Authorization: Basic header that writes hasroot=1 directly into the session file. |
| 3 — Propagate | Triggers the do_token_denied internal gadget to flush the raw session into the live cache. |
| 4 — Verify | Accesses /json-api/version — a 200 OK with version data confirms unrestricted root access. |