CVE-2019-10149
📋 TL;DR
CVE-2019-10149 is a critical remote command execution vulnerability in Exim mail transfer agent versions 4.87 through 4.91. Attackers can exploit improper recipient address validation to execute arbitrary commands as root on vulnerable Exim servers. Organizations running affected Exim versions on internet-facing mail servers are at immediate risk.
💻 Affected Systems
- Exim
📦 What is this software?
Exim by Exim
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root-level remote code execution, allowing attackers to install malware, exfiltrate data, pivot to internal networks, or create persistent backdoors.
Likely Case
Remote attackers gain root access to mail servers, enabling email interception, credential theft, and use as attack platform for further network exploitation.
If Mitigated
Limited impact with proper network segmentation, minimal privileges, and intrusion detection systems in place to detect and block exploitation attempts.
🎯 Exploit Status
Multiple public exploits available. Attack requires sending specially crafted email to vulnerable server. No authentication needed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 4.92 or later
Vendor Advisory: https://www.exim.org/static/doc/security/CVE-2019-10149.txt
Restart Required: Yes
Instructions:
1. Backup current Exim configuration. 2. Download and install Exim 4.92 or later from exim.org. 3. Apply configuration changes if needed. 4. Restart Exim service. 5. Verify service is running with patched version.
🔧 Temporary Workarounds
Disable vulnerable delivery method
linuxTemporarily disable the vulnerable delivery mechanism by modifying Exim configuration
Edit exim.conf and set 'deliver_drop_privilege = true'
Add 'acl_smtp_rcpt = acl_check_rcpt' with proper validation
🧯 If You Can't Patch
- Block inbound SMTP traffic at network perimeter to vulnerable servers
- Implement strict firewall rules limiting SMTP access to trusted IPs only
🔍 How to Verify
Check if Vulnerable:
Check Exim version with 'exim --version' or 'exim -bV'. If version is between 4.87 and 4.91 inclusive, system is vulnerable.
Check Version:
exim --version | head -1
Verify Fix Applied:
Run 'exim --version' and confirm version is 4.92 or higher. Test with known exploit payloads to verify they are blocked.
📡 Detection & Monitoring
Log Indicators:
- Unusual recipient addresses with shell metacharacters
- Failed delivery attempts with suspicious patterns
- Unexpected process execution from Exim
Network Indicators:
- SMTP connections with malformed RCPT TO commands
- Unusual outbound connections from mail server
SIEM Query:
source="exim.log" AND ("RCPT TO" CONTAINS "|*" OR "RCPT TO" CONTAINS "`*" OR "RCPT TO" CONTAINS "$(*")
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00020.html
- http://packetstormsecurity.com/files/153218/Exim-4.9.1-Remote-Command-Execution.html
- http://packetstormsecurity.com/files/153312/Exim-4.91-Local-Privilege-Escalation.html
- http://packetstormsecurity.com/files/154198/Exim-4.91-Local-Privilege-Escalation.html
- http://seclists.org/fulldisclosure/2019/Jun/16
- http://www.openwall.com/lists/oss-security/2019/06/05/2
- http://www.openwall.com/lists/oss-security/2019/06/05/3
- http://www.openwall.com/lists/oss-security/2019/06/05/4
- http://www.openwall.com/lists/oss-security/2019/06/06/1
- http://www.openwall.com/lists/oss-security/2019/07/25/6
- http://www.openwall.com/lists/oss-security/2019/07/25/7
- http://www.openwall.com/lists/oss-security/2019/07/26/4
- http://www.openwall.com/lists/oss-security/2021/05/04/7
- http://www.securityfocus.com/bid/108679
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-10149
- https://seclists.org/bugtraq/2019/Jun/5
- https://security.gentoo.org/glsa/201906-01
- https://usn.ubuntu.com/4010-1/
- https://www.debian.org/security/2019/dsa-4456
- https://www.exim.org/static/doc/security/CVE-2019-10149.txt
- http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00020.html
- http://packetstormsecurity.com/files/153218/Exim-4.9.1-Remote-Command-Execution.html
- http://packetstormsecurity.com/files/153312/Exim-4.91-Local-Privilege-Escalation.html
- http://packetstormsecurity.com/files/154198/Exim-4.91-Local-Privilege-Escalation.html
- http://seclists.org/fulldisclosure/2019/Jun/16
- http://www.openwall.com/lists/oss-security/2019/06/05/2
- http://www.openwall.com/lists/oss-security/2019/06/05/3
- http://www.openwall.com/lists/oss-security/2019/06/05/4
- http://www.openwall.com/lists/oss-security/2019/06/06/1
- http://www.openwall.com/lists/oss-security/2019/07/25/6
- http://www.openwall.com/lists/oss-security/2019/07/25/7
- http://www.openwall.com/lists/oss-security/2019/07/26/4
- http://www.openwall.com/lists/oss-security/2021/05/04/7
- http://www.securityfocus.com/bid/108679
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-10149
- https://seclists.org/bugtraq/2019/Jun/5
- https://security.gentoo.org/glsa/201906-01
- https://usn.ubuntu.com/4010-1/
- https://www.debian.org/security/2019/dsa-4456
- https://www.exim.org/static/doc/security/CVE-2019-10149.txt
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10149