
Zimbra CVE-2024-45519 echter Fix - Offizieller Patch ist unvollständig
Zimbra CVE-2024-45519 echter Fix - Offizieller Patch ist unvollständig
CVE-2024-45519 ist eine kritische RCE-Schwachstelle (CVSS 9.8) in der Zimbra Collaboration Suite. Viele Administratoren glauben, dass sie nach dem Anwenden des offiziellen Patches nicht geschützt sind. Dieses Dokument klärt die tatsächliche Situation auf.
CVE-2024-45519 ermöglicht die nicht authentifizierte Remote-Befehlsausführung über den postjournal-Dienst auf Port 10027.
Nach einer Untersuchung im Rahmen eines Incident Response können wir bestätigen, dass:
Das Anwenden von Patch p46/p47 + das Deaktivieren von postjournal ist ausreichend:
zmlocalconfig -e postjournal_enabled=false
zmcontrol restart
Der Patch ersetzt das verwundbare popen() in der postjournal-Binärdatei durch execvp() und verhindert so die Befehlsinjektion, selbst wenn Port 10027 offen ist.
Port 10027 wird für den Zimbra-Mailfluss benötigt. Das Schließen unterbricht die Zustellung:
# DO NOT DO THIS - it will break your mail server!
# sed -i 's/^\[%%zimbraLocalBindAddress%%\]:10027 inet/#...' master.cf.in
Testen, ob die Schwachstelle gepatcht ist:
printf "EHLO probe.test\r\nMAIL FROM:<[email protected]>\r\nRCPT TO:<x: \$(echo TEST > /opt/zimbra/mailboxd/webapps/zimbra/public/test.txt)>\r\nQUIT\r\n" \
| nc 127.0.0.1 25
# Expected: 555 5.5.4 Unsupported option OR 501 5.1.3 Bad recipient address syntax
# Verify file was NOT created:
ls /opt/zimbra/mailboxd/webapps/zimbra/public/test.txt
# Expected: No such file or directory = PATCHED ✅
# Regenerate PreAuth Key
su - zimbra -c "zmprov generateDomainPreAuthKey -f yourdomain.com"
# Monitor for webshells every 5 minutes
cat > /root/check_webshell.sh << 'EOF'
#!/bin/bash
WEBDIR="/opt/zimbra/mailboxd/webapps/zimbra/public"
ALERT_EMAIL="[email protected]"
LOGFILE="/var/log/webshell_check.log"
if [ -f "$WEBDIR/version.txt" ]; then
echo "$(date) - ALERT: version.txt detected!" >> $LOGFILE
rm -f "$WEBDIR/version.txt"
echo "SECURITY ALERT: version.txt detected on $(hostname)" | \
/opt/zimbra/common/sbin/sendmail -f [email protected] $ALERT_EMAIL
fi
find "$WEBDIR" -maxdepth 1 -name "*.jsp" -newer "$WEBDIR/login.jsp" -type f | while read f; do
echo "$(date) - ALERT: Suspicious JSP: $f" >> $LOGFILE
rm -f "$f"
echo "SECURITY ALERT: Suspicious file $f detected" | \
/opt/zimbra/common/sbin/sendmail -f [email protected] $ALERT_EMAIL
done
EOF
chmod +x /root/check_webshell.sh
echo "*/5 * * * * root /root/check_webshell.sh" > /etc/cron.d/check_webshell
| Version | Status |
|---|---|
| Zimbra 8.8.15 vor p46 | Verwundbar |
| Zimbra 8.8.15 p46/p47 | Gepatcht ✅ |
| Zimbra 9.0.0 vor p41 | Verwundbar |
| Zimbra 10.x vor 10.0.9 | Verwundbar |
Entdeckt während eines Incident Response von Lionel Sarrazin - CDH Informatique