CVEs / CVE-2020-7247
CVE-2020-7247: OpenSMTPD Remote Code Execution Vulnerability
- Known exploited in the CISA KEV catalog since 25 Mar 2022
- critical 9.8 CVSS 3.1 (NVD)
- EPSS 98.9% chance of exploitation in the next 30 days, higher than 99% of CVEs (30 Oct 2026)
- Last changed at its sources
Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.
Check your servers with Stackurity Already using Stackurity? Search for CVE-2020-7247
Summary
smtp_mailaddr in smtp_session.c in OpenSMTPD, as used in OpenBSD and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session.
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.
Affected and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| n/a n/a | n/a | — |
Exploitation
| In CISA KEV since | 25 Mar 2022 |
|---|---|
| Due date for US federal agencies | 15 Apr 2022 |
| Used in ransomware campaigns | Unknown |
| Required action | Apply updates per vendor instructions. |
Severity
| CVSS 3.1 | 9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HScored by NVD |
|---|---|
| Weakness | CWE-78, CWE-755 |
References
- CVE-2020-7247 on NVD
- CVE-2020-7247 in the CISA KEV catalog
- CVE-2020-7247 on OSV
- http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html Exploit, Third Party Advisory, VDB Entry
- http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html Exploit, Third Party Advisory, VDB Entry
- http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html Exploit, Third Party Advisory, VDB Entry
- http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html Exploit, Third Party Advisory, VDB Entry
- http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html Broken Link, Third Party Advisory, VDB Entry
- http://seclists.org/fulldisclosure/2020/Jan/49 Exploit, Mailing List, Third Party Advisory
- http://www.openwall.com/lists/oss-security/2020/01/28/3 Exploit, Mailing List, Third Party Advisory
- https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45 Patch
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPH4QU4DNVHA7ACFXMYFCEP5PSXXPN4E/ Mailing List, Third Party Advisory
- https://seclists.org/bugtraq/2020/Jan/51 Mailing List, Third Party Advisory
- https://usn.ubuntu.com/4268-1/ Third Party Advisory
- https://www.debian.org/security/2020/dsa-4611 Mailing List, Third Party Advisory
- https://www.kb.cert.org/vuls/id/390745 Third Party Advisory, US Government Resource
- https://www.openbsd.org/security.html Patch, Vendor Advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-7247 US Government Resource
Sources
Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.
This product uses data from the NVD API but is not endorsed or certified by the NVD.