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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | exim4 | 4.90.1-1 | — |
| Debian 13 | exim4 | 4.90.1-1 | — |
| Debian 12 | exim4 | 4.90.1-1 | — |
| Debian 9 | exim4 | 4.89-2+deb9u3 | DSA-4110-1 |
| Debian 8 | exim4 | 4.84.2-2+deb8u5 | DSA-4110-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 7 | exim4 | 4.80-7+deb7u6 | DLA-1274-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | exim4 | 4.86.2-2ubuntu2.3 | USN-3565-1 |
| Ubuntu 14.04 LTS | exim4 | 4.82-3ubuntu2.4 | USN-3565-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 15 SP2 | exim | 4.94.2-bp152.6.4.1 | openSUSE-SU-2021:0754-1 |
| SUSE Package Hub 15 SP2 | libspf2 | 1.2.10-bp152.5.1 | openSUSE-SU-2021:0754-1 |
| SUSE Package Hub 15 SP1 | exim | 4.94.2-bp151.2.4.1 | openSUSE-SU-2021:0753-1 |
| SUSE Package Hub 15 SP1 | libspf2 | 1.2.10-bp151.4.1 | openSUSE-SU-2021:0753-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | exim | 4.94.2-4.2 | openSUSE-SU-2024:10746-1 |
| openSUSE Leap 15.2 | exim | 4.94.2-lp152.8.3.1 | openSUSE-SU-2021:0677-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | exim | 4.90.1-r0 | — |
| Alpine v3.23 | exim | 4.90.1-r0 | — |
| Alpine v3.22 | exim | 4.90.1-r0 | — |
| Alpine v3.21 | exim | 4.90.1-r0 | — |
| Alpine v3.20 | exim | 4.90.1-r0 | — |
Show 13 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | exim | 4.90.1-r0 | — |
| Alpine v3.18 | exim | 4.90.1-r0 | — |
| Alpine v3.17 | exim | 4.90.1-r0 | — |
| Alpine v3.16 | exim | 4.90.1-r0 | — |
| Alpine v3.15 | exim | 4.90.1-r0 | — |
| Alpine v3.14 | exim | 4.90.1-r0 | — |
| Alpine v3.13 | exim | 4.90.1-r0 | — |
| Alpine v3.12 | exim | 4.90.1-r0 | — |
| Alpine v3.11 | exim | 4.90.1-r0 | — |
| Alpine v3.10 | exim | 4.90.1-r0 | — |
| Alpine v3.9 | exim | 4.90.1-r0 | — |
| Alpine v3.8 | exim | 4.90.1-r0 | — |
| Alpine v3.7 | exim | 4.90.1-r0 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 2
- exim 4.90 - Remote Code Execution EDB-45671 · remote · Oct 24, 2018
- Exim < 4.90.1 - 'base64d' Remote Code Execution EDB-44571 · remote · May 2, 2018
GitHub 5 repositories
-
martinclauss/exim-rce-cve-2018-6789 ★ 11 · Mar 2, 2020
This repository provides a learning environment to understand how an Exim RCE exploit for CVE-2018-6789 works.
-
synacktiv/Exim-CVE-2018-6789 ★ 10 · Oct 10, 2019
PoC materials to exploit CVE-2018-6789
-
beraphin/CVE-2018-6789 ★ 3 · Nov 8, 2018
-
thistehneisen/CVE-2018-6789-Python3 ★ 2 · Aug 5, 2023
Exim < 4.90.1 RCE Vulnerability remake for Python3 with arguments passed from CLI
-
c0llision/exim-vuln-poc ★ 0 · Mar 16, 2018
CVE-2018-6789
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 7
- USN-3565-1 exim4 vulnerability Ubuntu Security Notices (USN) · Apr 22, 2026
- DSA-4110-1 exim4 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1274-1 exim4 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2021:0754-1 Security update for exim SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10746-1 exim-4.94.2-4.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:0677-1 Security update for exim SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:0753-1 Security update for exim SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://exim.org/static/doc/security/CVE-2018-6789.txt
- [oss-security] 20180207 CVE-2018-6789 Exim 4.90 and earlier: buffer overflow mailing-list
- USN-3565-1 vendor-advisory
- http://openwall.com/lists/oss-security/2018/02/10/2
- 1040461 vdb-entry
- DSA-4110 vendor-advisory
- 44571 exploit
- [debian-lts-announce] 20180210 [SECURITY] [DLA 1274-1] exim4 security update mailing-list
- https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1
- https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/
- 103049 vdb-entry
- 45671 exploit
- http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html