CVE-2020-7247 OpenSMTPD Remote Code Execution
Remote attackers can execute arbitrary commands as root via a crafted SMTP session in OpenSMTPD due to improper input validation.
- Exploited in the wild
- Since 25 Mar 2022
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-7247?
CVE-2020-7247 is a critical command injection vulnerability in Canonical Ubuntu Linux, published on 29 Jan 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Which versions are affected by CVE-2020-7247?
It affects 4 products.
Products include Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Openbsd Opensmtpd.
How do I fix CVE-2020-7247?
Apply the vendor's patch. US federal agencies must fix it by 15 Apr 2022.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2020-7247 being exploited?
Yes. Attackers have exploited CVE-2020-7247 in the wild since at least 25 Mar 2022.
Public exploit code: 1 Metasploit module, 3 Exploit-DB entries, 1 Nuclei template and 11 proofs of concept on GitHub.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as ALPINE-CVE-2020-7247, DEBIAN-CVE-2020-7247, DSA-4611-1, GHSA-rcw6-69h3-89fh, UBUNTU-CVE-2020-7247, USN-4268-1.