OS Command Injection in OpenSMTPD - CVE-2020-7247

 

OS Command Injection in OpenSMTPD - CVE-2020-7247

Published: January 29, 2020 / Updated: March 3, 2023


Vulnerability identifier: #VU24745
CSH Severity: Critical
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2020-7247
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to improper validation of user-supplied input passed within the smtp_mailaddr() function. A remote unauthenticated attacker can send a specially crafted MAIL FROM command and execute arbitrary OS commands on the target system with root privileges.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

OpenSMTPD
Arch Linux
Fedora
opensmtpd (Debian package)
opensmtpd (Alpine package)
libasr
opensmtpd

How to mitigate CVE-2020-7247

Install updates from vendor's website.

OpenSMTPD - addressed in versions 6.6.2, 6.6.2p1
opensmtpd (Debian package) - addressed in versions 6.0.2p1-2+deb9u2, 6.0.3p1-5+deb10u3
opensmtpd (Alpine package) - update to 6.7.1p1-r0
libasr - update to 1.0.4-2.el7
opensmtpd - addressed in versions 6.6.4p1-1.el8, 6.6.4p1-2.fc32, 6.6.4p1-3.el7

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins