CVE-2020-7247
Confirmed PUBLISHEDsmtp_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...
Recommended Action
Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
At a Glance
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.
- CVE Published
- Jan 29, 2020
- Exploitation Reported
- Mar 25, 2022
- CVSS
- 9.8 Critical
- EPSS
- —
Affected Versions
| Vendor | Product | Version | Status |
|---|---|---|---|
| n/a |
n/a
|
n/a |
Affected |
CVE References
- DSA-4611 debian.org · Vendor Advisory https://www.debian.org/security/2020/dsa-4611
- USN-4268-1 usn.ubuntu.com · Vendor Advisory https://usn.ubuntu.com/4268-1/
- FEDORA-2020-b92d7083ca lists.fedoraproject.org · Vendor Advisory https://lists.fedoraproject.org/archives/list/package-announce%40list...
- VU#390745 kb.cert.org · Third-Party Advisory https://www.kb.cert.org/vuls/id/390745
- 20200129 [SECURITY] [DSA 4611-1] opensmtpd security update seclists.org · Mailing List https://seclists.org/bugtraq/2020/Jan/51
Show 9 more references
- 20200131 LPE and RCE in OpenSMTPD (CVE-2020-7247) seclists.org · Mailing List http://seclists.org/fulldisclosure/2020/Jan/49
- openbsd.org/security.html openbsd.org · CVE Record https://www.openbsd.org/security.html
- OSS-Security Mailing List openwall.com · CVE Record http://www.openwall.com/lists/oss-security/2020/01/28/3
- GitHub — openbsd/src github.com · CVE Record https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc2...
- packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Esc... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privile...
- packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Exe... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Co...
- packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remot...
- packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Pri...
- packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Co... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Rem...
Recommended Actions
- Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
- Check enrichment artifacts for scanner coverage and available PoCs before rolling remediation validation.
- Use the Pro API to automate enrichment, telemetry, and workflow delivery for VM, SOC, and CTI pipelines.
Known Exploited Vulnerability Sources
Catalogues that list this CVE as a known exploited vulnerability.
Per-source evidence links for KEV attestations are available through the KEVIntel Pro API.
Learn about Pro API access| Source | Added |
|---|---|
| CISA First | 2022-03-25 00:00 UTC |
Scanner Artifacts
Nuclei and Metasploit references linked to this CVE.
| Scanner | Reference | Detected |
|---|---|---|
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/javascript/cves/2020/CVE-2020-7247.yaml | Apr 25, 2025 |
| Metasploit | https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/smtp/opensmtpd_mail_from_rce.rb | Apr 28, 2025 |
Virtual Patch
Compensating WAF rules to help reduce exposure to this CVE. Rule content and deployable vendor exports are available with KEVIntel Enterprise.
KEVIntel does not currently have a virtual patch for this CVE. When available, KEVIntel virtual patches ship as deployable ModSecurity, Cloudflare, and AWS WAF rules.
Enterprise feature. Virtual patch rule content and deployable vendor exports (ModSecurity, Cloudflare, AWS WAF) are available to KEVIntel Enterprise users.
CVSS Scores
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
AV:N/AC:L/Au:N/C:C/I:C/A:C
Exploitation Status
Exploited in the wild
Recorded 2022-03-25 00:00:00 UTC · CISA
Proof of concept available
Recorded 2020-02-18 10:52:38 UTC · GitHub
Weaknesses (CWE)
-
Improper Handling of Exceptional Conditions
Scanner Integrations
| Scanner | Reference | Detected |
|---|---|---|
| Metasploit | https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/smtp/opensmtpd_mail_from_rce.rb | Apr 28, 2025 |
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/javascript/cves/2020/CVE-2020-7247.yaml | Apr 25, 2025 |
Potential Proof of Concepts
These PoCs are unverified and could contain malware. Use at your own risk.
github · Created 2021-11-26 17:28:56 UTC · 2 stars
Proof of concept for CVE-2020-7247 for educational purposes.
github · Created 2021-06-19 07:34:42 UTC · 2 stars
PoC exploit for CVE-2020-7247 OpenSMTPD 6.4.0 < 6.6.1 Remote Code Execution
github · Created 2021-06-02 12:02:33 UTC · 0 stars
This vulnerability exists in OpenBSD’s mail server OpenSMTPD’s “smtp_mailaddr()” function, and affects OpenBSD version 6.6. This allows an attacker to execute arbitrary shell commands like “sleep 66” as root user
github · Created 2021-02-13 06:57:47 UTC · 11 stars
OpenSMTPD 6.4.0 - 6.6.1 Remote Code Execution PoC exploit
github · Created 2020-02-18 10:52:38 UTC · 3 stars
Proof Of Concept Exploit for CVE-2020-7247 (Remote Execution on OpenSMTPD < 6.6.2
nuclei · Created Unknown
Timeline
Key exploitation, disclosure, scanner coverage, and KEV attestation events for this CVE.
-
15:02 UTC about 1 year ago15:02 UTC · about 1 year ago
Metasploit module available
Exploit module available
-
00:00 UTC about 1 year ago00:00 UTC · about 1 year ago
Nuclei template available
Scanner coverage available
-
00:00 UTC over 4 years ago00:00 UTC · over 4 years ago
Added to CISA KEV
Listed in the CISA Known Exploited Vulnerabilities catalog
-
10:52 UTC over 6 years ago10:52 UTC · over 6 years ago
Public PoC available
Public proof-of-concept code published
-
15:53 UTC over 6 years ago15:53 UTC · over 6 years ago
CVE published
Vulnerability disclosed publicly
-
00:00 UTC over 6 years ago00:00 UTC · over 6 years ago
CVE ID reserved
Identifier reserved by the CNA
Automate This Intelligence with the Pro API
Confidence scoring, exploit status, sensor telemetry, PoCs, scanner integrations, mentions, and tags are available programmatically for VM, SOC, and CTI workflows.
Pro API Example
GET /api/v2/pro/kevs/CVE-2020-7247
{
"cve_id": "CVE-2020-7247",
"title": "smtp_mailaddr in smtp_session.c in OpenSMTPD 6.6, as used in OpenBSD 6.6 and ...",
"affected_vendor": "OpenBSD",
"affected_product": "OpenSMTPD",
"affected_versions": [
{ "vendor": "...", "product": "...", "status": "affected", "display_label": "..." }
],
"confidence": "Confirmed",
"cvss_score": 9.8,
"epss_score": null,
"exploit_status": {
"exploited_in_the_wild": true,
"active_exploitation_observed": false
},
"sensor_telemetry": { "...": "Pro API fields" },
"proof_of_concepts": [ "..." ],
"scanner_integrations": [ "..." ]
}