CVE-2024-37383
📋 TL;DR
This Cross-Site Scripting (XSS) vulnerability in Roundcube Webmail allows attackers to inject malicious scripts via SVG animate attributes. When exploited, it enables session hijacking, credential theft, or malware delivery to users viewing malicious emails. All Roundcube Webmail instances before versions 1.5.7 and 1.6.7 are affected.
💻 Affected Systems
- Roundcube Webmail
📦 What is this software?
Webmail by Roundcube
Webmail by Roundcube
⚠️ Risk & Real-World Impact
Worst Case
Complete account takeover, credential theft, malware distribution to all users, and potential lateral movement within the email system.
Likely Case
Session hijacking for individual users, credential theft via phishing, and unauthorized access to email accounts.
If Mitigated
Limited impact with proper Content Security Policy (CSP) headers and input sanitization, potentially blocking script execution.
🎯 Exploit Status
Exploitation requires user interaction (viewing malicious email). The vulnerability is in SVG parsing, making exploitation straightforward once the attack vector is identified.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.5.7 or 1.6.7
Vendor Advisory: https://github.com/roundcube/roundcubemail/releases/tag/1.5.7
Restart Required: Yes
Instructions:
1. Backup current installation and database. 2. Download Roundcube 1.5.7 or 1.6.7 from official repository. 3. Replace existing files with new version. 4. Run update script if database schema changed. 5. Restart web server service.
🔧 Temporary Workarounds
Disable SVG rendering
allConfigure Roundcube to block or sanitize SVG attachments
Edit config.inc.php and add: $config['mime_types'] = array('image/svg+xml' => false);
Implement Content Security Policy
allAdd CSP headers to prevent script execution from untrusted sources
Add to web server config: Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;"
🧯 If You Can't Patch
- Implement strict Content Security Policy headers to block inline script execution
- Deploy web application firewall (WAF) rules to filter SVG content with animate attributes
🔍 How to Verify
Check if Vulnerable:
Check Roundcube version in config or via web interface. Vulnerable if version < 1.5.7 or 1.6.x < 1.6.7.
Check Version:
grep -r '\$version' /path/to/roundcube/program/include/iniset.php | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'
Verify Fix Applied:
Confirm version is 1.5.7 or 1.6.7+. Check that SVG files with animate attributes are properly sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual SVG file uploads
- Multiple failed login attempts from same IP
- Suspicious user agent strings
Network Indicators:
- Unusual outbound connections from webmail server
- Spike in traffic to email viewing endpoints
SIEM Query:
source="roundcube.log" AND ("svg" OR "animate") AND status=200
🔗 References
- https://github.com/roundcube/roundcubemail/commit/43aaaa528646877789ec028d87924ba1accf5242
- https://github.com/roundcube/roundcubemail/releases/tag/1.5.7
- https://github.com/roundcube/roundcubemail/releases/tag/1.6.7
- https://lists.debian.org/debian-lts-announce/2024/06/msg00008.html
- https://github.com/roundcube/roundcubemail/commit/43aaaa528646877789ec028d87924ba1accf5242
- https://github.com/roundcube/roundcubemail/releases/tag/1.5.7
- https://github.com/roundcube/roundcubemail/releases/tag/1.6.7
- https://lists.debian.org/debian-lts-announce/2024/06/msg00008.html
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-37383