CVE-2020-28024
📋 TL;DR
CVE-2020-28024 is a critical buffer underwrite vulnerability in Exim mail servers that allows unauthenticated remote attackers to execute arbitrary commands. The vulnerability occurs because the smtp_ungetc function can push back non-character error codes like EOF, leading to memory corruption. This affects all systems running vulnerable versions of Exim 4 before 4.94.2.
💻 Affected Systems
- Exim
📦 What is this software?
Exim by Exim
⚠️ Risk & Real-World Impact
Worst Case
Remote unauthenticated attackers gain full root/system-level access to the mail server, enabling complete system compromise, data theft, and lateral movement within the network.
Likely Case
Attackers exploit the vulnerability to install backdoors, cryptocurrency miners, or ransomware, and use the compromised server as a relay for spam or further attacks.
If Mitigated
With proper network segmentation and least-privilege configurations, impact is limited to the mail server itself, though data exfiltration and service disruption remain possible.
🎯 Exploit Status
Multiple public exploits exist and have been used in real-world attacks. The Qualys research team published detailed technical analysis and proof-of-concept.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Exim 4.94.2 and later
Vendor Advisory: https://www.exim.org/static/doc/security/CVE-2020-qualys/CVE-2020-28024-UNGET.txt
Restart Required: Yes
Instructions:
1. Download Exim 4.94.2 or later from exim.org. 2. Stop the Exim service. 3. Compile and install the new version. 4. Restart the Exim service. 5. Verify the version is 4.94.2 or higher.
🔧 Temporary Workarounds
Disable SMTP Service
linuxTemporarily disable the Exim SMTP service if patching cannot be immediately performed.
systemctl stop exim
service exim stop
Network Filtering
linuxRestrict SMTP access to trusted IP addresses only using firewall rules.
iptables -A INPUT -p tcp --dport 25 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j DROP
🧯 If You Can't Patch
- Implement strict network segmentation to isolate the vulnerable Exim server from critical systems.
- Deploy intrusion detection/prevention systems (IDS/IPS) with rules specifically targeting CVE-2020-28024 exploitation attempts.
🔍 How to Verify
Check if Vulnerable:
Check Exim version with 'exim --version' or 'exim -bV'. If version is earlier than 4.94.2, the system is vulnerable.
Check Version:
exim --version
Verify Fix Applied:
After patching, run 'exim --version' and confirm the version is 4.94.2 or higher.
📡 Detection & Monitoring
Log Indicators:
- Unusual SMTP connections from unexpected IP addresses
- Exim process crashes or abnormal restarts
- Suspicious commands in mail logs
Network Indicators:
- Unusual outbound connections from the Exim server
- SMTP traffic patterns matching known exploit signatures
SIEM Query:
source="exim.log" AND ("buffer overflow" OR "segmentation fault" OR "unexpected EOF")