CVE-2020-7247: OpenSMTPD Remote Code Execution Vulnerability
Vulnerability summary
CVE-2020-7247 is a high (CVSS 10.0) OS Command Injection vulnerability in OpenBSD OpenSMTPD. It is known to be exploited: CISA lists it, first on 25-03-2022. EPSS estimates a 98.97% chance of exploitation in the next 30 days, higher than 99.9% of scored vulnerabilities. 10 public exploits are recorded.
Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 29-01-2020PublishedVulnerability first disclosed.
- 25-03-2022Added to CISA KEVOpenSMTPD Remote Code Execution Vulnerability
- 15-04-2022CISA remediation dueApply updates per vendor instructions.
- 21-10-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · AlpineEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
98.97%
Chance of exploitation in the next 30 days
Percentile
100%
Versus all other CVEs
30-day change
0.00 pp
From 98.97% on 18-09-2026
Known exploited
Compare KEV catalogs- Added
- 25-03-2022
- Federal due date
- 15-04-2022
CISA required action
Apply updates per vendor instructions. nvd.nist.gov/vuln/detail/CVE-2020-7247
Public exploits
10 foundExploit Reference (openwall.com)
Maturity: unknown
Exploit Reference (packetstormsecurity.com)
Maturity: unknown
Exploit Reference (packetstormsecurity.com)
Maturity: unknown
Show all 10 exploits
Exploit Reference (seclists.org)
Maturity: unknown
Exploit Reference (packetstormsecurity.com)
Maturity: unknown
Exploit Reference (packetstormsecurity.com)
Maturity: unknown
OpenSMTPD - MAIL FROM Remote Code Execution (Metasploit)
Maturity: weaponized
OpenSMTPD 6.6.1 - Remote Code Execution
Maturity: weaponized
OpenSMTPD 6.4.0 < 6.6.1 - Local Privilege Escalation + Remote Code Execution
Maturity: weaponized
OpenSMTPD MAIL FROM Remote Code Execution
exploit/unix/smtp/opensmtpd_mail_from_rce
Maturity: weaponized
Weaknesses
CWE · root cause- CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
- CWE-755Improper Handling of Exceptional ConditionsThe product does not handle or incorrectly handles an exceptional condition.
Affected systems
Debian2 products
- opensmtpd< 6.6.2p1-1 | < 6.0.2p1-2+deb9u2 | < 6.0.3p1-5+deb10u3
- debian_linuxEOL9.0 | 10.0
Alpine1 product
- opensmtpd< 6.6.2p1-r0
Canonical1 product
- ubuntu_linuxEOL18.04 | 19.10
Fedoraproject1 product
- fedoraEOL32
Openbsd1 product
- opensmtpd6.6
Ubuntu1 product
- opensmtpd< 5.4.1p1-1ubuntu0.1~esm1 | < 5.7.3p2-1ubuntu0.1~esm1 | < 6.0.3p1-1ubuntu0.1
6 vendors · 7 products
References
25 links- www.openwall.com/lists/oss-security/2020/01/28/3X Refsource MISCREPORTExploitMailing ListThird Party Advisory
- packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.htmlX Refsource MISCREPORTExploitThird Party AdvisoryVDB Entry
- www.debian.org/security/2020/dsa-4611Vendor AdvisoryX Refsource DEBIANREPORTMailing ListThird Party Advisory
- packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.htmlX Refsource MISCREPORTExploitThird Party AdvisoryVDB Entry
- packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.htmlX Refsource MISCExploitThird Party AdvisoryVDB Entry
Show all 25 references
- packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.htmlX Refsource MISCExploitThird Party AdvisoryVDB Entry
- packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.htmlX Refsource MISCBroken LinkThird Party AdvisoryVDB Entry
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-7247Government ResourceUS Government Resource