search menu icon-carat-right cmu-wordmark

CERT Coordination Center

OpenSMTPD vulnerable to local privilege escalation and remote code execution

Vulnerability Note VU#390745

Original Release Date: 2020-01-31 | Last Revised: 2020-03-09

Overview

Qualys Research Labs found that the smtp_mailaddr() function in OpenSMTPD version 6.6 does not properly sanitize user input, which could allow a local attacker to escalate their privileges, and allow either a local or remote attacker to execute arbitrary code as root.

Description

OpenSMTPD is an open-source server-side implementation of the Simple Mail Transfer Protocol (SMTP) that is part of the OpenBSD Project. OpenSMTPD's smtp_mailaddr() function is responsible for validating sender and recipient mail addresses. If the local part of an address is invalid and the domain name is empty, smtp_mailaddr() will automatically add a domain name as opposed to failing because of the invalid local address. This will allow the invalid local address to pass through the function without validation.

Impact

An attacker could send a malformed SMTP message that will bypass the smtp_mailaddr() validation and execute arbitrary code. This could allow a local attacker to escalate their privileges, and allow either a local or remote attacker to execute arbitrary code as root.

Solution

Apply an update

OpenBSD has released a patch in OpenSMTPD version 6.6.2p1 to address this vulnerability.

Vendor Information

390745
 

View all 48 vendors View less vendors


CVSS Metrics

Group Score Vector
Base 10 AV:N/AC:L/Au:N/C:C/I:C/A:C
Temporal 10 E:ND/RL:ND/RC:ND
Environmental 10.0 CDP:ND/TD:ND/CR:ND/IR:ND/AR:ND

References

Acknowledgements

Thanks to Qualys Research Labs for reporting this vulnerability.

This document was written by Madison Oliver.

Other Information

CVE IDs: CVE-2020-7247
Date Public: 2020-01-28
Date First Published: 2020-01-31
Date Last Updated: 2020-03-09 14:40 UTC
Document Revision: 51

Sponsored by CISA.