Patchfirst
CVE-2020-7247 KEVPublic exploit Critical · 9.8 EPSS 99.0%

OpenSMTPD Remote Code Execution Vulnerability

OpenBSD · OpenSMTPD

Summary

The OpenSMTPD mail server, specifically the smtp_mailaddr routine in smtp_session.c as shipped in OpenSMTPD 6.6 and OpenBSD 6.6, fails to properly reject invalid input in MAIL FROM addresses because it returns an incorrect value when validation fails. An unauthenticated remote attacker who can reach the SMTP service of a default (uncommented) configuration can send a crafted SMTP session containing shell metacharacters to run arbitrary commands as root, with no user interaction required.

Official description · NVD

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.

Breakdown
69.8 / 100
Exploited
Yes, in CISA KEV
Reports
0
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

First seen exploited 2 years after disclosure. Public exploit code (Metasploit) was available 1 day before disclosure.

  1. Public exploit codeMetasploit1 day before
  2. Disclosedday 0
  3. First seen exploitedVulnCheck KEV evidenceAdded to CISA KEVEU database agrees+2 yrs

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

techniques

2 , grouped by in kill-chain order, 2 cited passages 2

Initial AccessTA0001

Exploit Public-Facing Application T1190 Medium
AI mapping from the description · how it is exploited

remote SMTP session exploits public-facing mail service

allows remote attackers to execute arbitrary commands as root via a crafted SMTP session
From the official description (NVD) Original (opens in a new tab) ↗

ExecutionTA0002

Command and Scripting Interpreter T1059 Medium
AI mapping from the description · primary impact

arbitrary command execution via shell metacharacters

execute arbitrary commands as root via a crafted SMTP session
From the official description (NVD) Original (opens in a new tab) ↗

Detection

0 rules for this CVE · 244 general rules for its techniques

Rules for this CVE

0 that reference CVE-2020-7247 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

What security researchers reported

Not named in any threat report yet

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

15 links, grouped by NVD tag (14 duplicates merged)
↑ ↓ chooseEnter openEsc close