Note: articles are for educational purposes and are not professional security advice — consult an expert for your specific needs.

Securing mail servers: Patch Exim's critical zero-day RCE

In short

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.

Alert: Critical Zero-Day Vulnerability in Exim Mail Servers Exposes to Remote Attacks

Affected systems and impact

FlawAffected systemsImpact
CVE-2023-42115Out-of-bounds write in the SMTP serviceExim before 4.96.1Unauthenticated remote code execution, crashes, data corruption or complete system takeover
CVE-2023-42116Stack-based buffer overflow in SMTP challengeEximNot stated
CVE-2023-42117Improper neutralization of special elementsEximRemote code execution
CVE-2023-42118Integer underflow in libspf2Exim using libspf2Remote code execution
CVE-2023-42114Out-of-bounds read in NTLM challengeEximInformation disclosure
CVE-2023-42119Out-of-bounds read in dnsdbEximInformation 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.

Severity9.8 Critical (CVSS 3.0, Trendmicro)
Fixed inexim 4.96.1
Affectedexim before 4.96.1
ExploitedNot in CISA's Known Exploited Vulnerabilities catalog
EPSS12% chance of exploitation in the next 30 days (FIRST, October 27, 2026)
Public exploit2 GitHub repositories name it: proofs of concept, scanners, detections. Unverified: some are fake or malicious.
VectorCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
WeaknessCWE-787 Out-of-bounds Write
UbuntuNot tracked yet
Debianbookworm, bookworm exim4: Fixed (4.96-15+deb12u10) · trixie exim4: Fixed (4.98.2-1+deb13u4) · forky, sid exim4: Fixed (4.100.1-4)
Red HatSeverity 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.

From NVD, Debian, Red Hat · checked October 28, 2026

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:

  1. CVE-2023-42116: Stack-based buffer overflow in SMTP challenge (CVSS v3.0: 8.1).
  2. CVE-2023-42117: Remote code execution due to improper neutralization of special elements (CVSS v3.0: 8.1).
  3. CVE-2023-42118: Integer underflow in libspf2 leading to remote code execution (CVSS v3.0: 7.5).
  4. CVE-2023-42119: Out-of-bounds read in dnsdb causing information disclosure (CVSS v3.0: 3.1).
  5. CVE-2023-42114: Out-of-bounds read in NTLM challenge resulting in information disclosure (CVSS v3.0: 3.7).

Mitigation and Recommendations

  1. Stay Informed: Constantly monitor updates on security vulnerabilities, especially for critical components like Exim MTA.
  2. 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.
  3. Evaluate Vulnerabilities: Assess the impact of these vulnerabilities in your specific environment and understand the risks involved.
  4. 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.

Quick revision

Interview flashcards

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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

  1. CVE recordCVE-2023-42115 in the National Vulnerability Database · nvd.nist.gov
Vishal

About the author

· Software & security engineer

GitHub · LinkedIn · X

Vishal writes Trickyworld's tutorials and interview-preparation guides on programming, databases, cyber security and AI. Vishal has been shipping production software long enough to have firm opinions about Python, PHP, Node.js, and JavaScript, and to have been wrong about each of them at least once. The work has run the whole stack: Drupal and Laravel applications, React front ends, MySQL and MongoDB underneath, Redis and Memcached for the things that had to be fast, Apache Solr for the things that had to be findable. That last part turned out to matter more than anyone expected. Tune a Solr index for a season, then watch a language model confidently retrieve the wrong document, and you recognise an old problem wearing new clothes. Most of what is hard about AI systems is not the model. It is retrieval, caching, latency budgets, and deciding what the system does when the answer comes back wrong — which is work he has been doing since well before anyone called it AI engineering. He plays a lot of games, which is less a hobby disclosure than an admission of where a good share of his engineering instinct came from. Real-time systems with a frame budget. State that has to stay coherent while a player does something no designer anticipated. The permanent question of what happens when the frame cannot finish in time. Those habits carry over more directly than they have any right to. He has written several books on programming, all built on the same conviction: most technical writing is unclear because the author never decided what to leave out. More from Vishal → · Editorial policy

#remote code execution#Zero-Day Vulnerability#email server security#Exim mail server#CVE-2023-42115#cybersecurity#network protection

More on Computer Tricks.

Latest articles

$ subscribe --weekly

Get the next tutorial in your inbox.

Programming, security and AI — the practical bits, no spam. Unsubscribe any time.