RUSTSEC-2026-0565: Unbounded buffering of an SMTP reply allows a malicious server to exhaust memory
A malicious or compromised server can send a reply line that never ends, which the client buffers until memory runs out. A reply made of many short lines also keeps a CPU core busy: for a few seconds per reply since 0.11.22, for as long as the server wants before it.
Applications that connect only to a trusted server over implicit TLS are not exposed; the risk applies to clients that may connect to untrusted servers, or that use STARTTLS or no TLS, where a man-in-the-middle can forge the reply.
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 realistically exposed to a malicious reply?
Clients that can connect to untrusted SMTP servers are exposed. Clients using STARTTLS or no TLS are also exposed because a man-in-the-middle can forge SMTP replies; clients connecting only to a trusted server over implicit TLS are not exposed.
What does an attacker need to do to trigger the resource exhaustion?
A malicious or compromised SMTP server must send a reply line that never terminates to cause unbounded memory buffering. Sending many short reply lines can instead keep a CPU core busy.
What is the impact of many short reply lines?
Since version 0.11.22, many short lines can occupy a CPU core for a few seconds per reply. Before that behavior, the server can keep the CPU busy for as long as it wants.