STARTTLS plaintext command injection vulnerability

Vulnerability Note VU#555316

Overview

Some STARTTLS implementations could allow a remote attacker to inject commands during the plaintext phase of the protocol.

Description

STARTTLS is an extension to plaintext communication protocols that offers a way to upgrade a plaintext connection to an encrypted (TLS or SSL) connection instead of using a separate port for encrypted communication. Some implementations of STARTTLS contain a vulnerability that could allow a remote unauthenticated attacker to inject commands during the plaintext protocol phase, that will be executed during the ciphertext protocol phase. This vulnerability is caused by the switch from plaintext to TLS being implemented below the application's I/O buffering layer.

This issue is only of practical concern for affected implementations that also perform correct certificate validation. Implementations which do not perform certificate validation are already inherently vulnerable to man-in-the-middle attacks.

Note: Not all implementations of STARTTLS are affected by this vulnerability. Some implementations of Simple Authentication and Security Layer (SASL) could also be affected by this vulnerability. Please see the Vendor Information below for specific vendor information.

Impact

A remote attacker with the ability to pose as a man-in-the-middle may be able to inject commands for the corresponding protocol (e.g., SMTP, POP3, etc.) during the plaintext protocol phase, that will then be executed during the ciphertext protocol phase.

Solution

Update

Please see the Vendor Information below for specific vendor information and patches.

Purge the application I/O buffer

Developers of STARTTLS-enabled applications should take care to purge the application's I/O buffer immediately after switching to TLS in order to mitigate this vulnerability.

Vendor Information

Vendor References

Addendum

Note that Qmail-TLS is a third-party extension for the qmail software.

Because STARTTLS is not supported by default in either the original qmail distribution or the netqmail distribution, those distributions are not vulnerable to this issue.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Red Hat, Inc.

Notified: January 19, 2011 Updated: April 07, 2011

Status

Affected

Vendor Statement

Vulnerable. This issue affects postfix packages in Red Hat Enterprise

Linux 4, 5, and 6. The Red Hat Security Response Team has rated thisissue as having moderate security impact, a future update will addressthis flaw.

This issue did not affect the versions of the sendmail package as shippedwith Red Hat Enterprise Linux 3, 4, 5, or 6, as Sendmail by switching toSMTP over TLS replaces the entire received SMTP commands stream, alongwith its read/write buffers and read/write functions.

This issue did not affect the versions of the exim package as shippedwith Red Hat Enterprise Linux 4 and 5, as Exim by switching to SMTP overTLS replaces plaintext read/write functions with TLS read/write functions.

Addendum

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Watchguard Technologies, Inc.

Notified: January 19, 2011 Updated: April 14, 2011

Status

Affected

Vendor Statement

TLS Command Injection Vulnerability: A TLS Hotfix is available for XCS version 9.0 and 9.1 to resolve a potential command injection vulnerability in the TLS over SMTP implementation. The vulnerability makes it possible to allow a man-in-the-middle to inject commands during the plaintext protocol phase, that would be executed during the ciphertext protocol phase. A full description of the vulnerability is described in CERT Vulnerability Note VU#555316. This fix

is included in the XCS 9.0 Update 1 as well as the XCS 9.1 TLS Hotfix updates

Vendor Information

We are not aware of further vendor information regarding this vulnerability.