ZeroHour

CVE-2020-7247

KEV PoC ×6large

Unauthenticated Root RCE in OpenSMTPD 6.6 (OpenBSD and Linux)

CISA: OpenSMTPD Remote Code Execution Vulnerability

CVSS 3.1
9.8 critical
EPSS
99%p100
Published
()
KEV added
AI analysis

OpenSMTPD 6.6 contains a critical, unauthenticated remote code execution flaw (CWE-78) caused by an incorrect return value from input validation in smtp_mailaddr in smtp_session.c. A remote attacker triggers it during a normal SMTP session by supplying shell metacharacters in the MAIL FROM field; when OpenSMTPD runs with its default (uncommented) configuration, the unsanitized address is passed to a shell during mail delivery, executing attacker-supplied commands. Because the affected delivery path runs with root privileges, the attacker gains arbitrary command execution as root on the mail server. Affected deployments include OpenBSD 6.6, where OpenSMTPD is the default mail daemon, plus Debian, Fedora, and Ubuntu systems shipping OpenSMTPD 6.6. Exploitation is confirmed: the flaw is in CISA's Known Exploited Vulnerabilities catalog (added 2022-03-25), multiple public PoC exploits exist, and EPSS estimates a 99% probability of exploitation within 30 days.

What to do: Apply vendor updates per CISA's required action: upgrade OpenSMTPD to the patched release (6.6.4p1 or later per vendor advisories) or install the OpenBSD 6.6 errata patch, and pull updated packages from Debian, Fedora, or Ubuntu. Verify your running version and whether the default (uncommented) smtpd.conf is in use; until patched, restrict access to the SMTP service from untrusted networks. Hunt for signs of compromise, such as unexpected commands or processes executed as root by smtpd.

Affected
OpenBSD OpenSMTPD6.6 (including 6.6.1 and 6.6.2 per public exploit references); vulnerable in the default (uncommented) configuration
OpenBSD6.6 (ships the affected OpenSMTPD)
Debian Linuxreleases shipping OpenSMTPD 6.6 (specific versions not specified in source data)
Fedora Project Fedorareleases shipping OpenSMTPD 6.6 (specific versions not specified in source data)
Canonical Ubuntu Linuxreleases shipping OpenSMTPD 6.6 (specific versions not specified in source data)
Estimated exposure
large≈10,000–100,000 internet-exposed OpenSMTPD servers (exact count unknown) — OpenSMTPD is the default mail daemon in OpenBSD 6.6 and is packaged by Debian, Fedora, and Ubuntu, but is deployed far less widely than Postfix or Exim, and public internet scans of SMTP banners around the time of disclosure showed exposed…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

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.

CISA Known Exploited Vulnerability
Affected
OpenBSD OpenSMTPD
Required action
Apply updates per vendor instructions.
Due date
Ransomware use
Unknown
Vendors
openbsddebianfedoraprojectcanonical
Products
opensmtpd, debian linux, fedora, ubuntu linux
Weakness
CWE-78, CWE-755
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

In the news