LiveBreach Intelligence: data breaches, leaks & ransomware, tracked as they surfaceOngoing protection: GalaxyWarden →
Recent BreachesData breach tracker

CVE-2020-7247: OpenSMTPD Remote Code Execution Vulnerability

RBRecent Breaches Vulnerability Intelligence·Mar 25, 2022
High⚠ Actively exploited (CISA KEV)
High
Severity
Active
CISA KEV
No
Ransomware use
Apr 15, 2022
Patch deadline
⚠ Exploited in the wild. CISA added CVE-2020-7247 to its Known Exploited Vulnerabilities catalog on Mar 25, 2022, with a federal patch deadline of Apr 15, 2022 — meaning attackers are actively using it. If you run the affected software, patch it immediately.

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.

CVE-2020-7247 is a remote code execution vulnerability in OpenSMTPD, the SMTP server used in OpenBSD and other products. A crafted SMTP session can let an unauthenticated attacker run arbitrary commands with root privileges on the mail server. Because mail transfer agents are often internet-facing and privileged, successful exploitation can give an attacker full control of the host and a foothold for further movement.

Defenders should treat this as a high-priority issue for any system running OpenSMTPD until the vendor update has been applied and verified. Specifics such as exact affected releases must be confirmed against the vendor advisory.

How it works

The vulnerability is rooted in improper handling of exceptional conditions (CWE-755) that leads to OS command injection (CWE-78). In the smtp_mailaddr function within smtp_session.c, OpenSMTPD fails to sanitize or correctly reject certain malformed address data supplied during an SMTP conversation. An attacker who can reach the SMTP service can send a specially crafted session that causes the daemon to pass attacker-controlled input to a shell executed as root.

No local account or prior authentication is required; the attack surface is the network-exposed SMTP listener. The result is arbitrary command execution with the highest privileges on the system. Exact exploit mechanics and any proof-of-concept details are outside the scope of public summary data and should be obtained only from trusted vendor or coordinator advisories if needed for defensive testing.

Am I affected? How to find it in your systems

OpenSMTPD is the default mail transfer agent on OpenBSD and is also packaged for other Unix-like operating systems. It typically listens on TCP port 25 (and sometimes submission ports) on mail relays, gateways, and servers that accept inbound or outbound SMTP.

Inventory steps:

Network telemetry showing anomalous SMTP traffic patterns or sudden outbound connections originating from the mail server can also indicate exploitation attempts.

How to remediate

The primary remediation is to apply the security update supplied by the OpenBSD project or the downstream vendor that packages OpenSMTPD. Follow the vendor’s instructions exactly for obtaining, verifying, and installing the patched release, then restart the service and confirm the new version is running.

After patching:

CISA’s required action is simply to apply updates per vendor instructions; no additional mandatory steps are listed beyond that.

If you can't patch immediately

If an immediate upgrade is not possible, reduce the attack surface while you schedule the patch:

These measures are compensating controls only; they do not eliminate the underlying flaw.

If your data may have been exposed

Actively exploited remote-code-execution vulnerabilities on mail servers frequently lead to full host compromise, credential theft, and data exfiltration. If you have evidence of exploitation or cannot rule it out, treat the system as breached: isolate it, preserve volatile evidence, rotate credentials, and begin incident-response procedures. You can also run a free exposure scan of your email addresses against known breach data sets to determine whether associated accounts have appeared in prior leaks.

AICompiled with AI assistance from public sources and published under our editorial standards.

Details

AffectedOpenBSD · OpenSMTPD
WeaknessCWE-755
Added to CISA KEVMar 25, 2022
Federal patch deadlineApr 15, 2022
Known ransomware useNot documented
Check if your data is exposed →

Official records: NVD · CISA KEV

← All actively-exploited vulnerabilities