RCE in OpenBSD Opensmtpd
CVE-2020-7247
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.
Vulnerability class: Command Injection (OS Command Injection)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.990 (99.9th percentile), scored .
Very high probability of exploitation in the next 30 days — among the top 0.1% most-likely-to-be-exploited CVEs. 100th percentile — 99.9% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.990 · newest: 0.990 · change: 0.000
Affected products
- OpenBSD Opensmtpd — versions 6.6
- Canonical Ubuntu Linux — versions 18.04, 19.10
- Debian Linux — versions 9.0, 10.0
- Fedoraproject Fedora — versions 32
Weakness classification (CWE)
CISA KEV (Known Exploited Vulnerabilities)
This CVE is on the CISA KEV catalog, added on . CISA KEV inclusion means CISA has confirmed in-the-wild exploitation; US federal agencies are required to remediate within a published due date.
BOD 22-01 due date: .
Required action: Apply updates per vendor instructions.
Public proof-of-concept exploits
- FiroSolutions/cve-2020-7247-exploit
- QTranspose/CVE-2020-7247-exploit
- r0lh/CVE-2020-7247
- superzerosec/cve-2020-7247
- presentdaypresenttime/shai_hulud
- SimonSchoeni/CVE-2020-7247-POC
- f4T1H21/CVE-2020-7247
- CyberCTF/vulhub-opensmtpd-cve-2020-7247
- solmin111/OpenSMTPD-CVE-2020-7247-
- minhluannguyen/CVE-2020-7247-reproducer
References
- www.openbsd.org/security.html (Patch, Vendor Advisory)
- www.openwall.com/lists/oss-security/2020/01/28/3 (Exploit, Mailing List, Third Party Advisory)
- github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45 (Patch)
- packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Cod… (Exploit, VDB Entry, Third Party Advisory)
- seclists.org/bugtraq/2020/Jan/51 (mailing-list, Mailing List, Third Party Advisory)
- www.debian.org/security/2020/dsa-4611 (vendor-advisory, Mailing List, Third Party Advisory)
- packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html (Exploit, VDB Entry, Third Party Advisory)
- www.kb.cert.org/vuls/id/390745 (US Government Resource, Third Party Advisory, third-party-advisory)
- seclists.org/fulldisclosure/2020/Jan/49 (mailing-list, Exploit, Mailing List, Third Party Advisory)
- packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution… (Exploit, VDB Entry, Third Party Advisory)
Frequently asked questions
- What is CVE-2020-7247?
- CVE-2020-7247 is a critical-severity vulnerability in OpenBSD Opensmtpd, classified under OS Command Injection. CVSS score: 9.8/10. Published 2020-01-29.
- How severe is CVE-2020-7247?
- Critical severity. CVSS v3 base score is 9.8 out of 10.
- Is CVE-2020-7247 known to be exploited?
- Yes. CVE-2020-7247 is listed in the CISA Known Exploited Vulnerabilities catalog (added 2022-03-25), indicating it is being actively exploited. 51 public proof-of-concept repositories are indexed.