CVE-2020-7247
Description
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.
Severity
CRITICAL
CVSS v3
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
98.972%
chance of exploitation in the next 30 days
higher than 99.9% of scored CVEs · 2026-11-17
CISA KEV
Listed
added 2022-03-25
Public exploit code
Yes
Exploit references (NVD and CNA): 6
Metasploit modules: 1
Nuclei templates: 1
Exploit-DB: 3
Weakness
- CWE-78: Improper Neutralization of Special Elements used in an OS Command
- CWE-755: Improper Handling of Exceptional Conditions
CISA Known Exploited Vulnerabilities entry
| Vulnerability name | OpenSMTPD Remote Code Execution Vulnerability |
|---|---|
| Vendor / product | OpenBSD / OpenSMTPD |
| Date added | 2022-03-25 |
| Federal remediation due date | 2022-04-15 |
| Required action | Apply updates per vendor instructions. |
| Known ransomware campaign use | Unknown |
CISA SSVC decision points
| Exploitation | active |
|---|---|
| Automatable | yes |
| Technical impact | total |
| Scored | 2025-02-04 |
Timeline
- 2020-01-29Published by the CNA15:53 UTC
- 2020-01-30First Exploit-DB entry (EDB-ID 47984)1 day after publication
- 2022-03-25Added to the CISA KEV catalog786 days after publication
- 2025-02-04CISA SSVC decision recorded1833 days after publication
Exploit and advisory records
| Exploit-DB | Type | Platform | Published | EDB-verified |
|---|---|---|---|---|
| EDB-ID 48051 | remote | openbsd | 2020-02-11 | yes |
| EDB-ID 48038 | remote | linux | 2020-02-10 | yes |
| EDB-ID 47984 | remote | linux | 2020-01-30 | yes |
Nuclei templates:
- CVE-2020-7247: OpenSMTPD 6.4.0-6.6.1 - Remote Code Execution
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| openbsd opensmtpd | 6.6no fix listed | not listed |
| canonical ubuntu_linux | 18.04no fix listed19.10no fix listed | not listednot listed |
| debian debian_linux | 10.0no fix listed9.0no fix listed | not listednot listed |
| fedoraproject fedora | 32no fix listed | not listed |
References
- https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45
- https://www.openbsd.org/security.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPH4QU4DNVHA7ACFXMYFCEP5PSXXPN4E/
- https://usn.ubuntu.com/4268-1/
- https://www.debian.org/security/2020/dsa-4611
- http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html
- http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html
- http://seclists.org/fulldisclosure/2020/Jan/49
- http://www.openwall.com/lists/oss-security/2020/01/28/3
- http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html
- https://seclists.org/bugtraq/2020/Jan/51
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-7247
- https://www.kb.cert.org/vuls/id/390745
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2020-7247'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2020-7247'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2020-7247'curl 'https://api.contrastcyber.com/cve_products/CVE-2020-7247'curl 'https://api.contrastcyber.com/kev_lookup/CVE-2020-7247'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).