Detect RoundCube Webmail Deserialization of Untrusted Data (CVE-2025-49113) in Elastic Security
CVE-2025-49113 is an actively exploited deserialization of untrusted data vulnerability (CWE-502) in Roundcube Webmail. When exploited, an attacker can send a specially crafted serialized PHP object via the web interface, leading to remote code execution on the underlying server. This vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog and requires immediate patching to versions 1.5.10 or 1.6.11.
MITRE ATT&CK
- Tactic
- Initial Access Execution Persistence
Elastic Detection Query
sequence by source.ip with maxspan=5m
[network where event.category == "network" and
destination.port in (80, 443, 8080, 8443) and
url.path like~ "*roundcube*" and
(
url.query like~ "*O%3A*" or
url.query like~ "*a%3A*" or
url.query like~ "*s%3A*" or
http.request.body.content like~ "*O:[0-9]*:*" or
http.request.body.content like~ "*a:[0-9]*:{*"
)
]
[process where event.category == "process" and
process.parent.name in ("apache2", "httpd", "nginx", "php", "php-fpm") and
process.name not in ("php", "php-fpm", "apache2", "httpd") and
(
process.name in ("sh", "bash", "dash", "curl", "wget", "python", "python3", "perl", "ruby") or
process.args like~ "*nc *" or
process.args like~ "*ncat*" or
process.args like~ "*/dev/tcp/*"
)
] EQL sequence rule correlating HTTP requests containing PHP serialized payloads to Roundcube endpoints followed by suspicious child process spawning from web server processes, indicating successful deserialization RCE via CVE-2025-49113.
Data Sources
Required Tables
False Positives & Tuning
- Web server maintenance scripts legitimately spawning shell processes
- PHP-FPM or CGI workers that fork legitimate child processes for document rendering
- Automated backup or log rotation scripts triggered by web server parent processes
- Legitimate Roundcube cron workers spawned under web server parent context
Other platforms for CVE-2025-49113
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Roundcube Deserialization Probe via GET Parameter
Expected signal: HTTP GET request to Roundcube /index.php with O%3A in query string captured in web access logs; PHP error log may show unserialize() invocation
- Test 2Roundcube POST Body Deserialization with Crafted Object
Expected signal: POST request to Roundcube /index.php with serialized object in body captured by WAF or proxy; PHP error log records unserialize call or type error
- Test 3Web Shell Drop via Simulated Roundcube RCE
Expected signal: File creation event in Roundcube web root (inotify/auditd/EDR file write event); new .php file with non-standard name in web root directory
- Test 4Outbound Reverse Shell from PHP Process (Post-Exploitation Simulation)
Expected signal: Process creation event: www-data spawning bash with /dev/tcp redirect; outbound TCP connection from web server worker to port 4444; EDR network connection alert for web process initiating outbound shell
Unlock Pro Content
Get the full detection package for CVE-2025-49113 including response playbook, investigation guide, and atomic red team tests.