CVE-2020-7247
OpenSMTPD Remote Code Execution Vulnerability
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.
Description as published by the source, in English.
Key facts
- Published
- 2020-01-29
- Last modified
- 2026-06-17
- Assigned by
- cve@mitre.org
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Scored by
- nvd@nist.gov (NVD Primary)
- Probability of exploitation
-
98.9 %
among the highest of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Yes, see references
Actively exploited
CISA added this vulnerability to the Known Exploited Vulnerabilities catalogue on 2022-03-25, with a remediation deadline of 2022-04-15 for US federal agencies.
Required action: Apply updates per vendor instructions.
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Canonical | Ubuntu Linux | 18.04 | Affected |
| Canonical | Ubuntu Linux | 19.10 | Affected |
| Debian | Debian Linux | 10.0 | Affected |
| Debian | Debian Linux | 9.0 | Affected |
| Fedoraproject | Fedora | 32 | Affected |
| Openbsd | Opensmtpd | 6.6 | Affected |
Weakness type
-
CWE-755: Improper Handling of Exceptional Conditions
The product does not handle or incorrectly handles an exceptional condition.
-
CWE-78: Improper Neutralization of Special Elements used in an OS Command
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS …
References
- http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-E…
- 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.ht…
- http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.h…
- http://seclists.org/fulldisclosure/2020/Jan/49
- http://www.openwall.com/lists/oss-security/2020/01/28/3
- https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/…
- https://seclists.org/bugtraq/2020/Jan/51
- https://usn.ubuntu.com/4268-1/
- https://www.debian.org/security/2020/dsa-4611
- https://www.kb.cert.org/vuls/id/390745
- https://www.openbsd.org/security.html
- http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-E…
- 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.ht…
- http://packetstormsecurity.com/files/162093/OpenBSD-OpenSMTPD-6.6-Remote-Code-Execution.h…
- http://seclists.org/fulldisclosure/2020/Jan/49
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.