CVE-2020-7247: OpenSMTPD Remote Code Execution Vulnerability

Published Jan 29, 2020
·
Updated

Last updated 25 August 2025

Other sources

smtpmailaddr in smtpsession.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.

— Launchpad

smtpmailaddr in smtpsession.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

Affected Software

22 affected componentsFixes available
OpenBSD OpenSMTPD=6.6
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Fedoraproject Fedora=32
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=19.10
debian/opensmtpd
6.8.0p2-47.6.0p1-17.9.0p0-1
OpenBSD OpenSMTPD
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0
alpine/opensmtpd<6.6.2p1-r0
6.6.2p1-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/opensmtpd to a version that resolves this vulnerability.

    Fixed in 6.8.0p2-4Fixed in 7.6.0p1-1Fixed in 7.9.0p0-1
  2. Upgrade

    Upgrade alpine/opensmtpd to a version that resolves this vulnerability.

    Fixed in 6.6.2p1-r0

Event History

Jan 29, 2020
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·03:53 PM
Data Sourced
via MITRE·03:53 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software
Jan 30, 2020
Exploit Published
via GitHub·07:29 PM
Mar 25, 2022
Data Sourced
via CISA·12:00 AM
DescriptionWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2020-7247?

CVE-2020-7247 is a remote code execution vulnerability in OpenSMTPD.

2

How does CVE-2020-7247 work?

CVE-2020-7247 allows remote attackers to execute arbitrary commands as root via a crafted SMTP session, using shell metacharacters in a MAIL FROM field.

3

What is the severity of CVE-2020-7247?

CVE-2020-7247 has a severity rating of 9.8 (Critical).

4

Which software products are affected by CVE-2020-7247?

OpenSMTPD 6.6 in OpenBSD 6.6 and other products are affected by CVE-2020-7247.

5

How can I fix CVE-2020-7247?

To fix CVE-2020-7247, you should update to the patched version of OpenSMTPD provided by your vendor or distribution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203