This week Qualys Research Labs, a vulnerability management provider, discovered a vulnerability in the OpenSMTPD Mail server used in conjunction with the OpenBSD operating system. This flaw – identified as CVE-2020-7247 – allows for an attacker to execute arbitrary code with command privileges. OpenSMTPD as a service is present in many Linux distributions such as FreeBSD, Debian, Fedora, and Alpine. Although it was discovered only recently, it is possiblethe vulnerability has been present since May 2018. While the exploitation has limitations in its applicability in terms of local part length – the maximum number of characters allowed is 64. Qualys discovered an easy work around for this problem through its research using the Morris Worm.
Using a technique from the Morris Worm, Qualys was able to bypass the limitations by executing the body of the mail as a shell script in Sendmail. The key finding from Qualys Research Lab was that the technical expertise required to execute a successful attack using this vulnerability was low. Once it was discovered, Qualys worked quickly with OpenBSD to make sure that the vulnerability was disclosed in tandem with the patch to fix it. As of now it is unknown if any successful attacks were already carried out using the exploit.
Users who operate OpenBSD and Linux distribution should patch their systems immediately. The OpenSMTPD development team prepared a patch that is available both on GitHub and opensmtpd.org. While both OpenBSD and Linux distributions are a smaller subset of the market share, both are commonly used in business operations today. Furthermore, it is unknown which OpenBSD or Linux distributions are vulnerable to the flaw. Potentially any Linux-based OS or OpenBSDs are compromised. If you operate either a Linux distribution or OpenBSD you should seek to remediate your systems immediately. Companies like IBM, Google, and Amazon among others are currently still operating certain systems and servers using Linux distributions.