Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Email Security

OpenSMTPD Vulnerability Leads to Command Injection

An update released this week for the OpenSMTPD mail server addresses an out-of-bounds read vulnerability that could lead to arbitrary command execution.

OpenSMTPD is the open source implementation of the Simple Mail Transfer Protocol (SMTP) in OpenBSD, and its portable version can run on multiple Linux distributions, and Apple’s Mac OS X platform.

An update released this week for the OpenSMTPD mail server addresses an out-of-bounds read vulnerability that could lead to arbitrary command execution.

OpenSMTPD is the open source implementation of the Simple Mail Transfer Protocol (SMTP) in OpenBSD, and its portable version can run on multiple Linux distributions, and Apple’s Mac OS X platform.

Tracked as CVE-2020-8794, the recently discovered issue was introduced in December 2015. The security flaw is remotely exploitable and can be abused to execute arbitrary shell commands. In versions released after May 2018, the commands are executed as root.

The issue resides in OpenSMTPD’s client-side code, which delivers mail to remote SMTP servers, and exploitation is possible either client-side, or server-side, explains security firm Qualys, which discovered the vulnerability.

Client-side exploitation is possible using OpenSMTPD’s default configuration. The mail server listens on localhost only, but it can deliver mail from local users to remote servers. In the event that the remote server is controlled by an attacker, the vulnerability can be exploited.

Server-side exploitation requires for the attacker to connect to the OpenSMTPD server and send an email that creates a bounce. When OpenSMTPD connects to the attacker’s mail server to deliver the bounce, the attacker exploits the client-side vulnerability. To achieve shell command execution, the attacker needs to crash OpenSMTPD and wait for it to be restarted.

Qualys came up with a simple exploit that was tested against OpenBSD 6.6, OpenBSD 5.9 (the first vulnerable release), Debian 10, Debian 11 (testing), and Fedora 31, but the company will not release further details on the vulnerability and an exploit until later this week.

“An out of bounds read in smtpd allows an attacker to inject arbitrary commands into the envelope file which are then executed as root. Separately, missing privilege revocation in smtpctl allows arbitrary commands to be run with the _smtpq group,” OpenBSD’s developers note on GitHub.

Advertisement. Scroll to continue reading.

A second vulnerability found in OpenSMTPD allows an unprivileged local attacker to read the first line of an arbitrary file (such as root’s password hash in /etc/master.passwd) or the entire contents of another user’s file (if this file and /var/spool/smtpd/ are on the same filesystem).

Tracked as CVE-2020-8793, the bug is generally not exploitable on Linux, “because /proc/sys/fs/protected_hardlinks is 1 by default on most distributions,” Qualys says. However, the flaw is exploitable on Fedora 31, and yields full root privileges.

Related: Serious Vulnerability Discovered in OpenSMTPD

Related: VPN Connection Hijacking Vulnerability Affects Linux, Unix Systems

Related: Libarchive Vulnerability Impacts Multiple Linux Distributions

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Attack detection firm Vectra AI has appointed Jeff Reed to the newly created role of Chief Product Officer.

Shaun Khalfan has joined payments giant PayPal as SVP, CISO.

UK cybersecurity agency NCSC announced Richard Horne as its new CEO.

More People On The Move

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Cloud Security

Cloud security researcher warns that stolen Microsoft signing key was more powerful and not limited to Outlook.com and Exchange Online.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.