RUSTSEC-2026-0561: Missing dot-stuffing after a bare LF or CR allows SMTP command injection
Someone who controls the content of a message with bare LF or CR line endings can end it early with \n.\n on a server that takes a bare LF for a line ending. What follows is read by the server as SMTP commands, which can be used to send other messages over the same authenticated connection.
This affects messages passed to sendraw, and message bodies that are sent without being encoded. The LF line endings of a String body are converted to CRLF before it is sent.
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 message inputs are affected?
The issue affects content passed to send_raw and message bodies sent without encoding. A String body is not affected by LF-only line endings because lettre converts those LF line endings to CRLF before sending.
What must an attacker control to exploit this?
An attacker must control message content containing bare LF or CR line endings and be able to include an end-of-data sequence such as \n.\n. Exploitation also depends on the SMTP server accepting a bare LF as a line ending.
What is the practical impact after successful exploitation?
The attacker can terminate the message data early and cause following content to be interpreted as SMTP commands. Those commands can be used to send additional messages over the same authenticated SMTP connection.