CVE-2020-7247: OpenSMTPD Remote Code Execution Vulnerability
CVE-2020-7247 is a critical-severity flaw (CVSS 9.8) affecting opensmtpd, debian linux, fedora, reported as exploited in the wild. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- EPSS top 1%: very likely to be exploited
- Exploited in the wild (CISA KEV)
- Public exploit reference
- CISA SSVC: automatable with total technical impact
- Remotely exploitable, no login, no user action
- On your watchlist
A fixed release or distro patch exists.
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Exploited Added to the CISA Known Exploited Vulnerabilities list
- Deadline CISA due date for US federal agencies to patch
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: FiroSolutions/cve-2020-7247-exploit (25 stars)
- GitHub PoC: QTranspose/CVE-2020-7247-exploit (11 stars)
- GitHub PoC: r0lh/CVE-2020-7247 (5 stars)
- Exploit-DB: OpenSMTPD - MAIL FROM Remote Code Execution (RCE) (Metasploit)
- Exploit-DB: OpenSMTPD 6.6.1 - Remote Code Execution (RCE)
- Exploit-DB: OpenSMTPD 6.4.0 < 6.6.1 - Local Privilege Escalation (LPE) / Remote Code Execution (RCE)
- Metasploit: OpenSMTPD MAIL FROM Remote Code Execution
- Nuclei scan template: OpenSMTPD 6.4.0-6.6.1 - Remote Code Execution
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2020-7247?
opensmtpd: downgrade or apply the listed mitigation; debian linux: mitigate or apply the listed mitigation; fedora: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2020-7247 being exploited?
Yes. CVE-2020-7247 is on the CISA Known Exploited Vulnerabilities list, so treat it as patch-now.
What does CVE-2020-7247 affect?
CVE-2020-7247 affects opensmtpd, debian linux, fedora. Severity is critical (CVSS 9.8). 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 fi
How urgent is CVE-2020-7247?
Priority 100/100. Critical severity; EPSS top 1%: very likely to be exploited; Exploited in the wild (CISA KEV); Public exploit reference; CISA SSVC: automatable with total technical impact; Remotely exploitable, no login, no user action; On your watchlist
Software pages
Ubuntu vulnerabilities · Debian vulnerabilities
Related CVEs
- CVE-2025-62875 MEDIUM 5.5 DOWNGRADE UPGRADE An Improper Check for Unusual or Exceptional Conditions vulnerability in OpenSMTPD allows local users to crash
- CVE-2023-29323 HIGH 7.8 UPGRADE MITIGATE ascii_load_sockaddr in smtpd in OpenBSD before 7.1 errata 024 and 7.2 before errata 020, and OpenSMTPD Portabl
- CVE-2020-8794 CRITICAL 9.8 UPGRADE MITIGATE OpenSMTPD before 6.6.4 allows remote code execution because of an out-of-bounds read in mta_io in mta_session.
- CVE-2020-8793 MEDIUM 4.7 UPGRADE MITIGATE OpenSMTPD before 6.6.4 allows local users to read arbitrary files (e.g., on some Linux distributions) because
- CVE-2020-35680 HIGH 7.5 UPGRADE MITIGATE smtpd/lka_filter.c in OpenSMTPD before 6.8.0p1, in certain configurations, allows remote attackers to cause a