{"id":"CVE-2018-6789","published":"2018-02-08T23:29:01Z","modified":"2026-06-17T02:02:17Z","title":"Exim Buffer Overflow Vulnerability","vendor":"Exim","product":"Exim","tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"NVD"},"summary":{"text":"A buffer overflow in the base64d function of the SMTP listener in Exim, affecting versions before 4.90.1, allows memory corruption triggered by crafted input. An unauthenticated remote attacker who can reach the SMTP listener can send a handcrafted message to exploit it, and no user interaction or special configuration is required, as the attack path is network-accessible and needs no privileges.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:53:45Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"NVD"},"epss":{"score":0.82137,"percentile":0.99653,"date":"2026-10-28","provenance":"source"},"kev":{"dateAdded":"2021-11-03","dueDate":"2022-05-03","ransomware":true,"requiredAction":"Apply updates per vendor instructions.","notes":"https://nvd.nist.gov/vuln/detail/CVE-2018-6789","provenance":"source"},"vulncheckKev":{"dateAdded":"2020-02-25","exploitedFirstSeen":"2020-02-25","ransomware":true,"evidence":[{"url":"https://www.csk.gov.in/alerts/STOP_ransomware.html","date":"2020-02-25"},{"url":"https://cisa.gov/news-events/cybersecurity-advisories/aa20-275a","date":"2020-10-20"},{"url":"https://media.defense.gov/2020/Oct/20/2002519884/-1/-1/0/CSA_CHINESE_EXPLOIT_VULNERABILITIES_UOO179811.PDF","date":"2020-10-20"},{"url":"https://us-cert.cisa.gov/ncas/alerts/aa20-275a","date":"2020-10-20"},{"url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","date":"2021-11-03"},{"url":"https://www.trustwave.com/hubfs/Web/Library/Documents_pdf/2024_Trustwave_Professional_Services_Sector_Threat_Landscape.pdf","date":"2024-06-26"}],"evidenceTotal":6,"provenance":"source"},"exploited":true,"otx":{"pulseCount":50,"pulses":[{"name":"Actively_Exploited_Kev | Oct 29, 2026","url":"https://otx.alienvault.com/pulse/6ae20c1db17e7057ae7d9ad1","created":"2026-10-28"},{"name":"Actively_Exploited_Kev | Oct 28, 2026","url":"https://otx.alienvault.com/pulse/6ae0ba7e0e2a97ff7b218819","created":"2026-10-27"},{"name":"Actively_Exploited_Kev | Oct 27, 2026","url":"https://otx.alienvault.com/pulse/6adf68b85c3e852f3c111d18","created":"2026-10-26"},{"name":"Actively_Exploited_Kev | Oct 24, 2026","url":"https://otx.alienvault.com/pulse/6adb740e397c3ad4799aa4cd","created":"2026-10-23"},{"name":"Actively_Exploited_Kev | Oct 23, 2026","url":"https://otx.alienvault.com/pulse/6ada236fcfba2dfa730ea482","created":"2026-10-22"},{"name":"Actively_Exploited_Kev | Oct 22, 2026","url":"https://otx.alienvault.com/pulse/6ad8d33a077cbb5cab524d80","created":"2026-10-21"},{"name":"Actively_Exploited_Kev | Oct 21, 2026","url":"https://otx.alienvault.com/pulse/6ad78130c4d1ac2be83a8b6d","created":"2026-10-20"},{"name":"Actively_Exploited_Kev | Oct 20, 2026","url":"https://otx.alienvault.com/pulse/6ad62f63c24a405a3423cc13","created":"2026-10-19"},{"name":"Actively_Exploited_Kev | Oct 19, 2026","url":"https://otx.alienvault.com/pulse/6ad4dda174e5797d0bd238b7","created":"2026-10-18"},{"name":"Actively_Exploited_Kev | Oct 18, 2026","url":"https://otx.alienvault.com/pulse/6ad38c22e1848f8189d1c121","created":"2026-10-17"}],"provenance":"machine"},"cwes":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"},{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"http://openwall.com/lists/oss-security/2018/02/10/2","tags":["Mailing List","Third Party Advisory"]},{"url":"http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://www.openwall.com/lists/oss-security/2018/02/07/2","tags":["Mailing List","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/103049","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"http://www.securitytracker.com/id/1040461","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/","tags":["Exploit","Third Party Advisory"]},{"url":"https://exim.org/static/doc/security/CVE-2018-6789.txt","tags":["Vendor Advisory"]},{"url":"https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1","tags":["Patch"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/02/msg00009.html","tags":["Mailing List","Third Party Advisory"]},{"url":"https://usn.ubuntu.com/3565-1/","tags":["Third Party Advisory"]},{"url":"https://www.debian.org/security/2018/dsa-4110","tags":["Mailing List","Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/44571/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://www.exploit-db.com/exploits/45671/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://openwall.com/lists/oss-security/2018/02/10/2","tags":["Mailing List","Third Party Advisory"]},{"url":"http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://www.openwall.com/lists/oss-security/2018/02/07/2","tags":["Mailing List","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/103049","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"http://www.securitytracker.com/id/1040461","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/","tags":["Exploit","Third Party Advisory"]},{"url":"https://exim.org/static/doc/security/CVE-2018-6789.txt","tags":["Vendor Advisory"]},{"url":"https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1","tags":["Patch"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/02/msg00009.html","tags":["Mailing List","Third Party Advisory"]},{"url":"https://usn.ubuntu.com/3565-1/","tags":["Third Party Advisory"]},{"url":"https://www.debian.org/security/2018/dsa-4110","tags":["Mailing List","Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/44571/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://www.exploit-db.com/exploits/45671/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2018-6789","tags":["US Government Resource"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"source","basis":"ctid-kev","bases":["ctid-kev"],"basisDetail":"CTID Mappings Explorer KEV 07/28/2025 (ATT&CK 16.1); capability: Buffer Overflow","mappingType":"exploitation_technique","evidence":[],"comment":"CVE-2018-6789 is a vulnerability in Exim, an open-source mail transfer agent. This vulnerability, identified as an off-by-one buffer overflow, allows attackers to execute arbitrary code remotely by sending specially crafted messages to the SMTP listener. ","confidence":"high"},{"id":"T1059","name":"Command and Scripting Interpreter","tactics":["execution"],"provenance":"source","basis":"ctid-kev","bases":["ctid-kev"],"basisDetail":"CTID Mappings Explorer KEV 07/28/2025 (ATT&CK 16.1); capability: Buffer Overflow","mappingType":"primary_impact","evidence":[],"comment":"CVE-2018-6789 is a vulnerability in Exim, an open-source mail transfer agent. This vulnerability, identified as an off-by-one buffer overflow, allows attackers to execute arbitrary code remotely by sending specially crafted messages to the SMTP listener. ","confidence":"high"}],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2018-18536","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2018-18536","exploited":true,"exploitedSince":"2021-11-03","provenance":"source"},"exploits":[{"id":44571,"url":"https://www.exploit-db.com/exploits/44571","title":"Exim < 4.90.1 - 'base64d' Remote Code Execution","type":"remote","platform":"linux","date":"2018-05-02","verified":false,"provenance":"source"},{"id":45671,"url":"https://www.exploit-db.com/exploits/45671","title":"exim 4.90 - Remote Code Execution","type":"remote","platform":"linux","date":"2018-10-24","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":2,"earliest":"2018-05-02"},"pocGithub":{"count":5,"skipped":0,"earliest":"2018-03-16","earliestUrl":"https://github.com/c0llision/exim-vuln-poc","repos":[{"name":"martinclauss/exim-rce-cve-2018-6789","url":"https://github.com/martinclauss/exim-rce-cve-2018-6789","stars":11,"created":"2020-03-02"},{"name":"synacktiv/Exim-CVE-2018-6789","url":"https://github.com/synacktiv/Exim-CVE-2018-6789","stars":10,"created":"2019-10-10"},{"name":"beraphin/CVE-2018-6789","url":"https://github.com/beraphin/CVE-2018-6789","stars":3,"created":"2018-11-08"},{"name":"thistehneisen/CVE-2018-6789-Python3","url":"https://github.com/thistehneisen/CVE-2018-6789-Python3","stars":2,"created":"2023-08-05"},{"name":"c0llision/exim-vuln-poc","url":"https://github.com/c0llision/exim-vuln-poc","stars":0,"created":"2018-03-16"}]},"first":{"date":"2018-03-16","source":"PoC-in-GitHub","url":"https://github.com/c0llision/exim-vuln-poc"},"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html","https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/","https://www.exploit-db.com/exploits/44571/","https://www.exploit-db.com/exploits/45671/"],"flow":[{"stage":"exploitation","techniques":["T1190"],"provenance":"source"},{"stage":"primary","techniques":["T1059"],"provenance":"source"}],"timeline":[{"date":"2018-02-08","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-6789","provenance":"source"},{"date":"2018-03-16","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub; later: Exploit-DB 2018-05-02","url":"https://github.com/c0llision/exim-vuln-poc","provenance":"source"},{"date":"2020-02-25","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.csk.gov.in/alerts/STOP_ransomware.html","provenance":"source"},{"date":"2021-11-03","kind":"kev","label":"Added to CISA KEV (known ransomware use)","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","provenance":"source"},{"date":"2021-11-03","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2018-18536","provenance":"source"}],"speed":{"daysToPublicExploit":36,"firstExploitFrom":"PoC-in-GitHub","daysToKev":1364},"priority":{"score":79.8,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in CISA KEV and VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 2438 days ago"},{"name":"Known ransomware use","points":10.0,"detail":"CISA KEV and VulnCheck KEV: Known"},{"name":"EPSS percentile","points":19.93,"detail":"percentile 0.9965"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"4 NVD references tagged Exploit; 2 Exploit-DB entries; 5 PoC-in-GitHub repos"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"50 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}