CVE-2020-7247

NameCVE-2020-7247
Descriptionsmtp_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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDSA-4611-1
NVD severityhigh
Debian Bugs950121

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
opensmtpd (PTS)stretch6.0.2p1-2+deb9u2fixed
stretch (security)6.0.2p1-2+deb9u3fixed
buster6.0.3p1-5+deb10u3fixed
buster (security)6.0.3p1-5+deb10u4fixed
bullseye, sid6.6.4p1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
opensmtpdsource(unstable)6.6.2p1-1950121
opensmtpdsourcebuster6.0.3p1-5+deb10u3DSA-4611-1
opensmtpdsourcestretch6.0.2p1-2+deb9u2DSA-4611-1

Notes

https://www.openwall.com/lists/oss-security/2020/01/28/3
Fixed by: https://github.com/OpenSMTPD/OpenSMTPD/commit/2afab2297347342f81fa31a75bbbf7dbee614fda
https://ftp.openbsd.org/pub/OpenBSD/patches/6.6/common/019_smtpd_exec.patch.sig
The issue is exploitable after switching "to new grammar", which is included
in portable sync commit:
https://github.com/OpenSMTPD/OpenSMTPD/commit/be6ef06cba9484d008d9f057e6b25d863cf278ff (opensmtpd-6.4.0)

Search for package or bug name: Reporting problems