Date: 2025-06-13
Severity: CRITICAL
CVSS Score: 9.8 (Critical)
Attack Vector: Network
Attack Complexity: Low
Privileges Required: Low (authenticated user)
User Interaction: None
Impact: Remote Code Execution
Reported: No. We have not had any luck getting package maintainers to look into "potential" vulnerabilities unless we can provide a current proof of concept. As most of what we patch does not have a POC at the time we patch, we ceased attempting to report and just patch it ourselves to future-proof.
A critical remote code execution vulnerability was discovered in Roundcube Webmail affecting the eval_expression() method in roundcube/program/include/rcmail_output_html.php. The vulnerability allows authenticated users to execute arbitrary PHP code on the server through template injection attacks.
The eval_expression() method (line 1266) uses PHP's eval() function to process user-controllable template expressions without proper validation:
return eval("return ($expression);");
roundcube/program/include/rcmail_output_html.php:1266eval_expression()check_condition() → parse_conditions() → just_parse()The vulnerability can be exploited when user-controlled data is processed through Roundcube's template system:
eval_expression() processes the malicious inputeval() executes arbitrary PHP codeExample Exploit:
Template Expression: "><roundcube:if condition="system('id')">
Result: Remote command execution as web server user
File: roundcube/program/include/rcmail_output_html.php
Implemented comprehensive validation system:
validate_expression() method with blacklist approach for dangerous functionseval_expression() to validate before executionsystem(), exec(), shell_exec(), passthru()file_get_contents(), fopen(), readfile(), etc.mysql_*, mysqli_*, pg_*, etc.->, ::$variable()eval(), assert(), create_function()proc_*, pcntl_*socket_*, stream_*env:, config:, session:, cookie:, request:, browser:, template:empty(), in_array(), asciiwords(), strlen(), trim(), etc.==, !=, ===, !==&&, ||, !? :security@codamail.com
Report Generated: 2025-06-13
Status: RESOLVED - Comprehensive security validation implemented