LiveBreach Intelligence: data breaches, leaks & ransomware, tracked as they surfaceOngoing protection: GalaxyWarden →
Recent BreachesData breach tracker

CVE-2018-6789: Exim Buffer Overflow Vulnerability

RBRecent Breaches Vulnerability Intelligence·Nov 3, 2021
Critical⚠ Actively exploited (CISA KEV)Ransomware-linked
Critical
Severity
Active
CISA KEV
Yes
Ransomware use
May 3, 2022
Patch deadline
⚠ Exploited in the wild. CISA added CVE-2018-6789 to its Known Exploited Vulnerabilities catalog on Nov 3, 2021, with a federal patch deadline of May 3, 2022 — meaning attackers are actively using it. If you run the affected software, patch it immediately. Ransomware crews are known to exploit this flaw.

Exim contains a buffer overflow vulnerability in the base64d function part of the SMTP listener that may allow for remote code execution.

CVE-2018-6789 is a buffer overflow vulnerability in Exim, the widely used open-source mail transfer agent. It affects the base64d function within the SMTP listener and may allow remote code execution. Because Exim often handles inbound email on internet-facing servers, successful abuse can give an attacker a foothold on the mail host. CISA notes known ransomware use of this issue, so timely identification and remediation matter for any organization running Exim.

How it works

The weakness is classified as CWE-119: improper restriction of operations within the bounds of a memory buffer. In plain terms, the base64d routine that decodes base64 data during SMTP processing does not adequately bound the data it writes into a buffer. An attacker who can reach the SMTP listener can supply crafted input that overflows that buffer. When the overflow is controlled carefully, it can corrupt adjacent memory and potentially redirect execution, leading to remote code execution in the context of the Exim process. Exact exploit mechanics and preconditions vary by build and configuration; defenders should treat any unpatched Exim SMTP service as potentially reachable and confirm details against the vendor advisory rather than relying on generic descriptions.

Am I affected? How to find it in your systems

Exim commonly runs on Linux and Unix mail servers, often bound to port 25 (and sometimes submission or other SMTP ports) as the primary MTA or as a smarthost/relay. Inventory steps:

Because precise affected version ranges are not repeated here, always validate against the official Exim advisory before declaring a host clean or vulnerable.

How to remediate

Patch first. Apply the updates provided by the Exim maintainers or your OS vendor exactly as described in the vendor instructions; CISA’s required action is to apply those updates. After installing the fixed package:

For longer-term hardening of this class of flaw, run Exim with least privilege, keep the daemon in a restricted environment where practical, limit the SMTP service to only the interfaces and networks that require it, and maintain a rapid patch cadence for internet-facing MTAs.

If you can't patch immediately

If an emergency change window is unavailable, reduce exposure until the update can be applied:

These measures are compensating controls only; they do not replace the vendor patch.

If your data may have been exposed

Actively exploited vulnerabilities, especially those with documented ransomware use, frequently lead to broader compromise of the host and any mail or credentials it holds. If you suspect exploitation, isolate the system, preserve logs and memory images, and follow your incident-response process. As a further check, you can run a free exposure scan of your email addresses against known breach data to see whether associated accounts have appeared in prior incidents.

AICompiled with AI assistance from public sources and published under our editorial standards.

Details

AffectedExim · Exim
WeaknessCWE-119
Added to CISA KEVNov 3, 2021
Federal patch deadlineMay 3, 2022
Known ransomware useYes
Check if your data is exposed →

Official records: NVD · CISA KEV

← All actively-exploited vulnerabilities