{"id":"CVE-2020-7247","url":"https://www.cyber-defence.io/tools/cve/CVE-2020-7247","generatedAt":"2026-10-31T17:30:52.559Z","title":"OpenSMTPD Remote Code Execution Vulnerability","description":"smtp_mailaddr in smtp_session.c in OpenSMTPD 6.6, as used in OpenBSD 6.6 and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session, as demonstrated by shell metacharacters in a MAIL FROM field. This affects the \"uncommented\" default configuration. The issue exists because of an incorrect return value upon failure of input validation.","published":"2020-01-29T16:15:13.000Z","lastModified":"2026-06-17T03:24:35.000Z","status":"Analyzed","sourceIdentifier":"cve@mitre.org","cvss":{"version":"3.1","score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"cwe":["CWE-78","CWE-755"],"affected":["openbsd/opensmtpd","debian/debian linux","fedoraproject/fedora","canonical/ubuntu linux"],"epss":{"score":0.98972,"percentile":0.99929,"date":"2026-10-30","history":[]},"kev":{"listed":true,"dateAdded":"2022-03-25","dueDate":"2022-04-15","knownRansomwareCampaignUse":"Unknown","notes":"Apply updates per vendor instructions.\nhttps://nvd.nist.gov/vuln/detail/CVE-2020-7247"},"exploits":{"count":3,"verified":true,"firstPublished":"2020-01-30","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":48051,"kind":"exploit","title":"OpenSMTPD 6.4.0 < 6.6.1 - Local Privilege Escalation + Remote Code Execution","url":"https://www.exploit-db.com/exploits/48051","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/openbsd/remote/48051.pl","file":"exploits/openbsd/remote/48051.pl","published":"2020-02-11","added":"2020-02-11","updated":"2021-04-22","author":"Marco Ivaldi","type":"remote","platform":"openbsd","port":null,"verified":true,"codes":["CVE-2020-7247"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null},{"edbId":48038,"kind":"exploit","title":"OpenSMTPD - MAIL FROM Remote Code Execution (Metasploit)","url":"https://www.exploit-db.com/exploits/48038","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/linux/remote/48038.rb","file":"exploits/linux/remote/48038.rb","published":"2020-02-10","added":"2020-02-10","updated":"2020-02-10","author":"Metasploit","type":"remote","platform":"linux","port":25,"verified":true,"codes":["CVE-2020-7247"],"tags":"Metasploit Framework (MSF)","aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":"https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/unix/smtp/opensmtpd_mail_from_rce.rb"},{"edbId":47984,"kind":"exploit","title":"OpenSMTPD 6.6.1 - Remote Code Execution","url":"https://www.exploit-db.com/exploits/47984","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/linux/remote/47984.py","file":"exploits/linux/remote/47984.py","published":"2020-01-30","added":"2020-01-30","updated":"2021-04-22","author":"1F98D","type":"remote","platform":"linux","port":null,"verified":true,"codes":["CVE-2020-7247"],"tags":null,"aliases":null,"applicationUrl":"http://www.exploit-db.comopensmtpd-6.6.1p1.tar.gz","screenshotUrl":null,"referenceUrl":null}]},"verdict":{"level":"urgent","text":"Known to be exploited in the wild (CISA KEV, CISA remediation deadline 15 April 2022). Treat as an emergency change: patch or isolate now, then hunt for prior compromise."},"changes":[],"references":[{"url":"http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"http://seclists.org/fulldisclosure/2020/Jan/49","tags":["Exploit","Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"http://www.openwall.com/lists/oss-security/2020/01/28/3","tags":["Exploit","Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45","tags":["Patch"],"source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPH4QU4DNVHA7ACFXMYFCEP5PSXXPN4E/","tags":["Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://seclists.org/bugtraq/2020/Jan/51","tags":["Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://usn.ubuntu.com/4268-1/","tags":["Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://www.debian.org/security/2020/dsa-4611","tags":["Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://www.kb.cert.org/vuls/id/390745","tags":["Third Party Advisory","US Government Resource"],"source":"cve@mitre.org"},{"url":"https://www.openbsd.org/security.html","tags":["Patch","Vendor Advisory"],"source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://seclists.org/fulldisclosure/2020/Jan/49","tags":["Exploit","Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.openwall.com/lists/oss-security/2020/01/28/3","tags":["Exploit","Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45","tags":["Patch"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPH4QU4DNVHA7ACFXMYFCEP5PSXXPN4E/","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://seclists.org/bugtraq/2020/Jan/51","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://usn.ubuntu.com/4268-1/","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.debian.org/security/2020/dsa-4611","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.kb.cert.org/vuls/id/390745","tags":["Third Party Advisory","US Government Resource"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.openbsd.org/security.html","tags":["Patch","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-7247","tags":["US Government Resource"],"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2020-7247","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}