Actively exploited · Published Jan 29, 2020 · Assigned by mitre
CVE-2020-7247
Critical 9.8 Exploited
In plain English
A critical-severity security flaw in OpenSMTPD from OpenBSD. Attackers are actively exploiting it in the wild (listed by CISA on March 25, 2022). The chance it is exploited in the next 30 days is estimated at 99.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
CISA guidance
Apply updates per vendor instructions.
Federal agencies must remediate by Apr 15, 2022.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | opensmtpd | 6.6.2p1-r0 | ALPINE-CVE-2020-7247 |
| Alpine:v3.21 | opensmtpd | 6.6.2p1-r0 | ALPINE-CVE-2020-7247 |
| Alpine:v3.22 | opensmtpd | 6.6.2p1-r0 | ALPINE-CVE-2020-7247 |
| Alpine:v3.23 | opensmtpd | 6.6.2p1-r0 | ALPINE-CVE-2020-7247 |
| Alpine:v3.24 | opensmtpd | 6.6.2p1-r0 | ALPINE-CVE-2020-7247 |
| Debian:12 | opensmtpd | 6.6.2p1-1 | DEBIAN-CVE-2020-7247 |
| Debian:13 | opensmtpd | 6.6.2p1-1 | DEBIAN-CVE-2020-7247 |
| Debian:14 | opensmtpd | 6.6.2p1-1 | DEBIAN-CVE-2020-7247 |
Affected products (as reported)
Weakness: CWE-755 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://www.openbsd.org/security.html x_refsource_CONFIRM
- http://www.openwall.com/lists/oss-security/2020/01/28/3 x_refsource_MISC
- https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45 x_refsource_CONFIRM
- http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html x_refsource_MISC
- 20200129 [SECURITY] [DSA 4611-1] opensmtpd security update mailing-list, x_refsource_BUGTRAQ
- DSA-4611 vendor-advisory, x_refsource_DEBIAN
- http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html x_refsource_MISC
- VU#390745 third-party-advisory, x_refsource_CERT-VN
- 20200131 LPE and RCE in OpenSMTPD (CVE-2020-7247) mailing-list, x_refsource_FULLDISC
- http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html x_refsource_MISC
- http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html x_refsource_MISC
- USN-4268-1 vendor-advisory, x_refsource_UBUNTU
- FEDORA-2020-b92d7083ca vendor-advisory, x_refsource_FEDORA
- http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.html x_refsource_MISC
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-7247 government-resource