RUSTSEC-2026-0560: STARTTLS response injection allows a man-in-the-middle to forge SMTP replies
A man-in-the-middle can append replies of their own to the cleartext reply to STARTTLS. The client takes them for the server's replies to the commands it then sends over TLS, so the attacker can, for example, make a message that the server rejected look accepted.
Only connections upgraded with STARTTLS are affected (Tls::Required and Tls::Opportunistic, as set up by starttlsrelay). Implicit TLS (Tls::Wrapper, as set up by relay) is not.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/lettreto a version that resolves this vulnerability.Fixed in 0.11.24
Event History
Frequently Asked Questions
Which deployments are affected?
Only lettre SMTP connections that upgrade from cleartext using STARTTLS are affected: Tls::Required and Tls::Opportunistic configurations created with starttls_relay. Implicit TLS using Tls::Wrapper, created with relay, is not affected.
What does an attacker need to exploit this?
An attacker must be able to act as a man-in-the-middle on the connection and inject additional SMTP replies into the cleartext response to STARTTLS. No client-side privileges or user interaction are required.
What is the practical impact of a successful attack?
The client can treat attacker-forged replies as the server's responses to commands sent after TLS is established. For example, an email rejection can be made to appear as an acceptance, affecting message-delivery integrity and availability.
What can be done if patching is not immediately possible?
Avoid affected STARTTLS configurations where possible by using implicit TLS with Tls::Wrapper via relay, which is identified as unaffected. This reduces exposure to reply injection during the cleartext-to-TLS upgrade.