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, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDSA-4611-1
Debian Bugs950121

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
opensmtpd (PTS)bullseye6.8.0p2-3fixed
bookworm6.8.0p2-4fixed
sid, trixie7.5.0p0-1fixed

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

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

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