The STARTTLS implementation in mail/ngx_mail_smtp_handler.c in the SMTP proxy in nginx 1.5.x and 1.6.x before 1.6.1 and 1.7.x before 1.7.4 does not properly restrict I/O buffering, which allows man-in-the-middle attackers to insert commands into encrypted SMTP sessions by sending a cleartext command that is processed after TLS is in place, related to a "plaintext command injection" attack, a similar issue to CVE-2011-0411.
https://bugzilla.redhat.com/show_bug.cgi?id=1126891
http://nginx.org/download/patch.2014.starttls.txt
http://marc.info/?l=bugtraq&m=142103967620673&w=2
http://mailman.nginx.org/pipermail/nginx-announce/2014/000144.html