← Vulnerability feed

Vulnerability record · CVE-2018-6789 · published 8 February 2018

CVE-2018-6789: Exim SMTP base64d buffer overflow allows remote code execution

Exim · Exim

Exim before 4.90.1 contains a buffer overflow in the base64d function of its SMTP listener. A handcrafted message can trigger the overflow, and the flaw can be used to execute code remotely. Because Exim is a widely deployed mail transfer agent, an unauthenticated network flaw in its SMTP path is serious.

9.8 CVSS 3.1 Critical CISA KEV since 3 Nov 2021 Known ransomware use EPSS 82% · top 0.4% CWE-120 · Classic buffer overflow
9.8CVSS 3.1 base score, v2 7.5
82%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
3Affected product versions listed by NVD
27References, 8 tagged exploit
17 Jun 2026Last modified by NVD

Description

An issue was discovered in the base64d function in the SMTP listener in Exim before 4.90.1. By sending a handcrafted message, a buffer overflow may happen. This can be used to execute code remotely.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityCVSS 9.8, unauthenticated network reachability, confirmed KEV exploitation with ransomware use, and a very high EPSS probability make this an urgent patch.

What it is

Exim before 4.90.1 contains a buffer overflow in the base64d function of its SMTP listener. A handcrafted message can trigger the overflow, and the flaw can be used to execute code remotely. Because Exim is a widely deployed mail transfer agent, an unauthenticated network flaw in its SMTP path is serious.

Impact

An attacker can execute arbitrary code on the mail server, likely with the privileges of the Exim process. That gives full control of the host's mail handling and a foothold for further compromise.

Attack surface

Reachable over the network through the SMTP listener; the CVSS vector shows no privileges required and no user interaction. The description does not specify whether a valid recipient or session state is needed before the crafted message is processed.

Exploitation

CISA KEV lists it as exploited, with known ransomware campaign use, and EPSS gives a 30-day probability of 0.82137 (99.6th percentile). Multiple references are tagged Exploit, including public write-ups and Exploit-DB entries.

What to do

  • Upgrade Exim to 4.90.1 or later, or apply the vendor patch commit cf3cd306062a08969c41a1cdd32c6855f1abecf1.
  • Apply the Debian DSA-4110 or Ubuntu USN-3565-1 updates for distribution-packaged Exim.
  • If immediate patching is not possible, restrict SMTP exposure to trusted networks and disable or limit the base64d code path where feasible.
  • Monitor for and block known exploit traffic against the SMTP listener.
  • Verify no unauthorized code or persistence was placed on hosts that ran vulnerable Exim.

Detection

  • Inspect SMTP logs for malformed or unusually long base64-encoded message content sent to the listener.
  • Hunt for unexpected child processes, shells, or outbound connections spawned by the Exim service account.
  • Check for Exim crashes or restarts that correlate with inbound SMTP traffic.
  • Use file integrity monitoring on Exim binaries and configuration to catch post-exploitation changes.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2018-6789 to the Known Exploited Vulnerabilities catalog on 3 November 2021 as "Exim Buffer Overflow Vulnerability". CISA reports known use in ransomware campaigns. Required action: Apply updates per vendor instructions. Federal deadline 3 May 2022.

Affected products

3 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://openwall.com/lists/oss-security/2018/02/10/2 Mailing ListThird Party Advisory
http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html ExploitThird Party AdvisoryVDB Entry
http://www.openwall.com/lists/oss-security/2018/02/07/2 Mailing ListThird Party Advisory
http://www.securityfocus.com/bid/103049 Broken LinkThird Party AdvisoryVDB Entry
http://www.securitytracker.com/id/1040461 Broken LinkThird Party AdvisoryVDB Entry
https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/ ExploitThird Party Advisory
https://exim.org/static/doc/security/CVE-2018-6789.txt Vendor Advisory
https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1 Patch
https://lists.debian.org/debian-lts-announce/2018/02/msg00009.html Mailing ListThird Party Advisory
https://usn.ubuntu.com/3565-1/ Third Party Advisory
https://www.debian.org/security/2018/dsa-4110 Mailing ListThird Party Advisory
https://www.exploit-db.com/exploits/44571/ ExploitThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/45671/ ExploitThird Party AdvisoryVDB Entry
http://openwall.com/lists/oss-security/2018/02/10/2 Mailing ListThird Party Advisory
http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html ExploitThird Party AdvisoryVDB Entry
http://www.openwall.com/lists/oss-security/2018/02/07/2 Mailing ListThird Party Advisory
http://www.securityfocus.com/bid/103049 Broken LinkThird Party AdvisoryVDB Entry
http://www.securitytracker.com/id/1040461 Broken LinkThird Party AdvisoryVDB Entry
https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/ ExploitThird Party Advisory
https://exim.org/static/doc/security/CVE-2018-6789.txt Vendor Advisory
https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1 Patch
https://lists.debian.org/debian-lts-announce/2018/02/msg00009.html Mailing ListThird Party Advisory
https://usn.ubuntu.com/3565-1/ Third Party Advisory
https://www.debian.org/security/2018/dsa-4110 Mailing ListThird Party Advisory
https://www.exploit-db.com/exploits/44571/ ExploitThird Party AdvisoryVDB Entry
https://www.exploit-db.com/exploits/45671/ ExploitThird Party AdvisoryVDB Entry
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2018-6789 US Government Resource

Track CVE-2018-6789 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2023-46604Apache ActiveMQ OpenWire deserialization remote code executionThe Java OpenWire protocol marshaller in Apache ActiveMQ deserializes untrusted data, letting an attacker manipulate serialized class types so the br…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2018-6789), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.