Securing mail servers: Patch Exim's critical zero-day RCE
CVE-2023-42115 is an out-of-bounds write in Exim's SMTP service that allows unauthenticated remote code execution. Exim versions before 4.96.1 are affected; update to 4.96.1 or apply your distribution's fixed package, and restrict Internet access to Exim servers.
Summary written with AI from this article, and checked against it.

Affected systems and impact
| Flaw | Affected systems | Impact |
|---|---|---|
| CVE-2023-42115Out-of-bounds write in the SMTP service | Exim before 4.96.1 | Unauthenticated remote code execution, crashes, data corruption or complete system takeover |
| CVE-2023-42116Stack-based buffer overflow in SMTP challenge | Exim | Not stated |
| CVE-2023-42117Improper neutralization of special elements | Exim | Remote code execution |
| CVE-2023-42118Integer underflow in libspf2 | Exim using libspf2 | Remote code execution |
| CVE-2023-42114Out-of-bounds read in NTLM challenge | Exim | Information disclosure |
| CVE-2023-42119Out-of-bounds read in dnsdb | Exim | Information disclosure |
At a glanceCVE-2023-42115
CVE-2023-42115 has a CVSS 3.0 base score of 9.8 (Critical) from Trendmicro. It is fixed in exim 4.96.1. Debian bookworm, bookworm fixed it in exim4 4.96-15+deb12u10.
| Severity | 9.8 Critical (CVSS 3.0, Trendmicro) |
|---|---|
| Fixed in | exim 4.96.1 |
| Affected | exim before 4.96.1 |
| Exploited | Not in CISA's Known Exploited Vulnerabilities catalog |
| EPSS | 12% chance of exploitation in the next 30 days (FIRST, October 27, 2026) |
| Public exploit | 2 GitHub repositories name it: proofs of concept, scanners, detections. Unverified: some are fake or malicious. |
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Weakness | CWE-787 Out-of-bounds Write |
| Ubuntu | Not tracked yet |
| Debian | bookworm, bookworm exim4: Fixed (4.96-15+deb12u10) · trixie exim4: Fixed (4.98.2-1+deb13u4) · forky, sid exim4: Fixed (4.100.1-4) |
| Red Hat | Severity Critical, no package status yet |
Is there a public exploit for CVE-2023-42115?
Public code exists as of October 28, 2026: 2 public GitHub repositories name it (proofs of concept, scanners and detections). It is not in CISA's Known Exploited Vulnerabilities catalog. None of it is verified: some such repositories are fake or carry malware, so read the code before running it, and only against systems you own. FIRST's EPSS puts the chance of exploitation in the next 30 days at 12%, higher than 96.1% of scored CVEs.
A severe zero-day vulnerability, CVE-2023-42115, has been discovered in all versions of Exim mail transfer agent (MTA) software, posing a significant risk to servers exposed to the Internet. This vulnerability, disclosed through Trend Micro's Zero Day Initiative (ZDI), allows unauthenticated attackers to execute remote code, potentially leading to software crashes, data corruption, or even complete system takeover.
In-Depth Analysis of CVE-2023-42115
CVE-2023-42115 is a critical vulnerability that allows remote attackers to execute arbitrary code on affected Exim installations without requiring authentication. The vulnerability resides within the SMTP service, which typically listens on TCP port 25. It stems from inadequate validation of user-supplied data, leading to a potential buffer overflow.
The Significance of Exim in Cybersecurity
Exim is a widely-used MTA, serving as the default MTA on Debian Linux distributions and is installed on over 56% of the 602,000 reachable mail servers on the Internet. This widespread usage makes it a prominent target for attackers, as evidenced by previous exploits by groups like the Russian military hacking group Sandworm.
Other Exim Vulnerabilities Disclosed by ZDI
ZDI has disclosed five additional zero-day vulnerabilities in Exim:
- CVE-2023-42116: Stack-based buffer overflow in SMTP challenge (CVSS v3.0: 8.1).
- CVE-2023-42117: Remote code execution due to improper neutralization of special elements (CVSS v3.0: 8.1).
- CVE-2023-42118: Integer underflow in libspf2 leading to remote code execution (CVSS v3.0: 7.5).
- CVE-2023-42119: Out-of-bounds read in dnsdb causing information disclosure (CVSS v3.0: 3.1).
- CVE-2023-42114: Out-of-bounds read in NTLM challenge resulting in information disclosure (CVSS v3.0: 3.7).
Mitigation and Recommendations
- Stay Informed: Constantly monitor updates on security vulnerabilities, especially for critical components like Exim MTA.
- Patch and Update: Apply Exim's patches for CVE-2023-42114, CVE-2023-42115, and CVE-2023-42116 as soon as they are available. Regularly update your systems with the latest security fixes.
- Evaluate Vulnerabilities: Assess the impact of these vulnerabilities in your specific environment and understand the risks involved.
- Implement Access Controls: Restrict remote access to Exim servers from the Internet. Minimize exposure to reduce the risk of exploitation.
Conclusion
The discovery of the CVE-2023-42115 vulnerability in Exim mail servers is a stark reminder of the evolving cyber threats. Organizations using Exim must urgently assess their security posture, apply necessary patches, and implement stringent access controls to safeguard against potential cyberattacks.
Interview flashcards
What does CVE-2023-42115 allow an attacker to do on an Exim server?
It allows unauthenticated remote attackers to execute arbitrary code on affected Exim installations. Potential consequences include software crashes, data corruption, or complete system takeover.
What causes CVE-2023-42115, and where does it reside?
The vulnerability stems from inadequate validation of user-supplied data, leading to a potential buffer overflow. It resides in the SMTP service, which typically listens on TCP port 25.
Which versions of Exim are affected by CVE-2023-42115?
All versions of Exim mail transfer agent software are affected. Servers exposed to the Internet face a significant risk.
How should administrators mitigate CVE-2023-42115?
Administrators should apply Exim's patch as soon as it is available and restrict remote access to Exim servers from the Internet. They should also assess the vulnerability's impact in their specific environment.
Why does Exim's widespread use make it a prominent target for attackers?
Exim is installed on over 56% of the 602,000 reachable mail servers on the Internet and is the default MTA on Debian Linux distributions. This widespread usage makes it a prominent target for attackers.
What is CVE-2023-42116 in Exim?
CVE-2023-42116 is a stack-based buffer overflow in the SMTP challenge. Its CVSS v3.0 score is 8.1.
How can CVE-2023-42118 lead to remote code execution?
CVE-2023-42118 is an integer underflow in libspf2 that leads to remote code execution. Its CVSS v3.0 score is 7.5.
Written with AI from this article, and checked against it.
Source
- CVE recordCVE-2023-42115 in the National Vulnerability Database · nvd.nist.gov

