Exim mail servers are vulnerable to attacks due to a security hole that allows a local or remote attacker to execute arbitrary code with root privileges.
According to Exim developers, the vulnerability, tracked as CVE-2019-15846, affects version 4.92.1 and prior. Exim 4.92.2, first announced on Wednesday and released on Friday, should patch the flaw.
The vulnerability, described as a heap overflow, affects Exim servers that accept TLS connections, and exploitability is not dependent on the TLS library used — developers note that both GnuTLS and OpenSSL are affected.
“The vulnerability is exploitable by sending a SNI ending in a backslash-null sequence during the initial TLS handshake,” Exim developers said in an advisory.
While there is no evidence of malicious exploitation, Qualys researchers, who have analyzed the flaw, have developed a basic proof-of-concept (PoC) exploit to demonstrate that the heap overflow is exploitable. The issue was initially reported to Exim developers on July 21 by a researcher who uses the online moniker “Zerons.”
Exploitation of the vulnerability can be prevented by configuring the server to not accept TLS connections, but this mitigation is not recommended. Another mitigation involves adding specific rules to the access control list (ACL).
“This is a buffer overflow vulnerability. It does not directly allow attackers to execute commands as root. This flaw ultimately allows attackers to overwrite memory which can be used to achieve code execution. This is substantially different from a remote command execution because the attacker must overcome not only obstacles from the vulnerable program’s implementation but also from OS exploit mitigations,” Craig Young, computer security researcher for Tripwire’s Vulnerability and Exposure Research Team, told SecurityWeek.
“Due to the various complexities involved in crafting a reliable cross-platform exploit, it does not seem likely to me that we will quickly see active code execution attack campaigns by script kiddies. That being said, I would be surprised if more sophisticated attackers are not already using this to exploit specifically targeted mail servers,” Young added.
Exim is one of the most widely used mail servers and Shodan shows over 5 million instances, a majority in the United States. This makes Exim a tempting target for malicious actors.
In mid-June, security experts and companies warned that CVE-2019-10149, an Exim vulnerability that had been patched earlier that month, was being exploited to deliver cryptocurrency miners.
*updated with comments from Tripwire’s Craig Young
Related: Critical Code Execution Flaw Found in Exim
Related: ProFTPD Vulnerability Can Expose Servers to Attacks
Related: Several Vulnerabilities Patched in nginx