Vulnerability · CVE-2020-7247
OpenSMTPD Remote Code Execution Vulnerability
Published Jan 29, 2020 · catalog updated Jun 16, 2026 · OpenBSD OpenSMTPD
Patch now
CVE-2020-7247 is in the CISA known-exploited catalog, due Apr 15, 2022. Confirm OpenBSD OpenSMTPD against the vendor advisory and apply that fix. The CVSS score does not change the priority.
- Severity
- Critical9.8
- Known exploitation
- CISA KEV and VulnCheck KEV
- EPSS
- 98.97%
- Remediation
- Remediation guidance
- Affected products
- cpe canonical/ubuntu linux · cpe debian/debian linux · cpe fedoraproject/fedora · cpe openbsd/opensmtpd · vendor OpenBSD OpenSMTPD
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.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- cpe canonical/ubuntu linux18.04
- cpe canonical/ubuntu linux19.10
- cpe debian/debian linux10.0
- cpe debian/debian linux9.0
- cpe fedoraproject/fedora32
- cpe openbsd/opensmtpd6.6
- vendor OpenBSD OpenSMTPDversion unspecified
How to fix CVE-2020-7247
Recommended remediation
Apply updates per vendor instructions. CISA due date Apr 15, 2022.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
CVE-2020-7247 is in the CISA known-exploited catalog, due Apr 15, 2022. Confirm OpenBSD OpenSMTPD against the vendor advisory and apply that fix. The CVSS score does not change the priority.
Which versions are affected?
Compare what you have installed with canonical/ubuntu linux 18.04; canonical/ubuntu linux 19.10; debian/debian linux 10.0; debian/debian linux 9.0. Apply updates per vendor instructions.
What should an analyst verify?
CWE-755: Improper Handling of Exceptional Conditions; CWE-78: OS Command Injection. EPSS 98.97%. The CISA KEV listing is the exploitation evidence. A public exploit reference is linked in Sources. That is not the same as confirmed exploitation. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
No public source repository is identified for this product.
Timeline
Detection, updates, and resolution for this record.
Jan 29, 2020 · Catalog
Detected
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.
Mar 25, 2022 · CISA KEV
Known exploited
Apply updates per vendor instructions.
Apr 15, 2022 · CISA KEV
Remediation due
Apply updates per vendor instructions.
Jun 16, 2026 · Catalog
Updated
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.
Sources
- CISA KEVConfirmed exploitationCVE-2020-7247
smtp_mailaddr in smtp_session.c in OpenSMTPD, as used in OpenBSD and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session.
cisa.gov - CVE.orgVulnerability recordCVE-2020-7247
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2020-7247
30-day exploitation probability 99.0%
first.org - Exploit DatabasePublic exploit reference47984
Public archive entry. The exploit body is not stored here.
exploit-db.com - Exploit DatabasePublic exploit reference48038
Public archive entry. The exploit body is not stored here.
exploit-db.com - Exploit DatabasePublic exploit reference48051
Public archive entry. The exploit body is not stored here.
exploit-db.com - Metasploit ModulesPublic exploit moduleexploit_unix/smtp/opensmtpd_mail_from_rce
Public module reference (excellent). Module source is not copied into this catalog.
rapid7.com - NIST NVDVulnerability recordCVE-2020-7247
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" defa
nvd.nist.gov - Packet Storm SecurityCited referencehttp://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm SecurityCited referencehttp://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm SecurityCited referencehttp://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm SecurityCited referencehttp://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm SecurityCited referencehttp://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html
Packet Storm link already published on the finding.
packetstormsecurity.com - VulnCheck KEVConfirmed exploitationCVE-2020-7247
smtp_mailaddr in smtp_session.c in OpenSMTPD, as used in OpenBSD and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session.
vulncheck.com
References
Freshness
Last verified in this catalog Oct 17, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.