Skip to content
Fencer Vulns
critical 9.8

CVE-2020-7247 kev in the critical feed json

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 c…

published 2020-01-29 6 y ago modified 2026-06-17 4 mo ago also EUVD-2020-28374

cvss
9.8
version 3.1, CNA
cisa kev
Exploited
added 2022-03-25
epss
99.0%
EPSS 99.0% chance of exploitation in 30 days, percentile 99.9%
public exploits
4
Metasploit, Exploit-DB, plus a Nuclei check

Summary

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.

Patch / fix

cisa required action Apply updates per vendor instructions.

  • opensmtpd Debian 14, Debian 13, Debian 12 6.6.2p1-1

debian advisories DEBIAN-CVE-2020-7247

  • opensmtpd Ubuntu 18.04 LTS 6.0.3p1-1ubuntu0.1
  • opensmtpd Ubuntu Pro 14.04 LTS 5.4.1p1-1ubuntu0.1~esm1
  • opensmtpd Ubuntu Pro 16.04 LTS 5.7.3p2-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2020-7247

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • opensmtpd Alpine 3.24, Alpine 3.23, Alpine 3.22 +11 more 6.6.2p1-r0

alpine advisories ALPINE-CVE-2020-7247

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • opensmtpd Arch Linux 6.6.2p1-1

arch linux advisories AVG-1090

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2020-7247 updated cvss 8.8

opensmtpd: arbitrary commands execution in smtp_mailaddr in smtp_session.c via crafted SMTP session

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Timeline

  1. First public exploit (Metasploit exploit/unix/smtp/opensmtpd_mail_from_rce)
  2. Published
  3. Added to CISA KEV
  4. CISA patch deadline
  5. CISA SSVC: exploitation active

Known exploited

Added
4 y ago
Patch by
2022-04-15 (4 y ago)
Ransomware
Not known
Required action
Apply updates per vendor instructions.
Vendor, product
OpenBSD, OpenSMTPD
CISA name
OpenSMTPD Remote Code Execution Vulnerability

CISA SSVC

Exploitation
Active, exploited in the wild
Automatable
yes
Technical impact
total
Assessed
21 mo ago

Exploit prediction

98.97% chance of exploitation in the next 30 days, higher than 99.9% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Metasploit exploit/unix/smtp/opensmtpd_mail_from_rce OpenSMTPD MAIL FROM Remote Code Execution metasploit exploit, excellent rank, 2020-01-28
  • EDB-48051 OpenSMTPD 6.4.0 < 6.6.1 - Local Privilege Escalation + Remote Code Execution remote, 2020-02-11
  • EDB-48038 OpenSMTPD - MAIL FROM Remote Code Execution (Metasploit) remote, 2020-02-10
  • EDB-47984 OpenSMTPD 6.6.1 - Remote Code Execution remote, 2020-01-30
  • Nuclei template OpenSMTPD 6.4.0-6.6.1 - Remote Code Execution nuclei detection template
  • openwall.com http://www.openwall.com/lists/oss-security/2020/01/28/3 referenced PoC, tagged "exploit" by a source, unverified
  • packetstormsecurity.com http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
  • packetstormsecurity.com http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
  • seclists.org http://seclists.org/fulldisclosure/2020/Jan/49 referenced PoC, tagged "exploit" by a source, unverified
  • packetstormsecurity.com http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
  • packetstormsecurity.com http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CISA ADP 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 10.0 AV:N/AC:L/Au:N/C:C/I:C/A:C

Classification

Weakness
  • CWE-755 Improper Handling of Exceptional Conditions
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.