Skip to content
Smuggling / CRLF Write-up Advanced

SMTP Smuggling - Spoofing E-Mails Worldwide

Outbound and inbound SMTP servers disagreed about which byte sequence ends a message's data, so a sender could break out of the message body and inject extra SMTP commands. This let an attacker send spoofed e-mails from domains such as gmx.net and web.de that still passed SPF alignment checks, enabling targeted phishing.

Timo Longin Follow

Published on sec-consult.com

Update 2024-02-19: The SMTP smuggling research scored 3rd place in the Portswigger Top 10 web hacking techniques of 2023, check it out here: portswigger.net/research/top-10-web-hacking-techniques-of-2023

Timo Longin (@timolongin), on sec-consult.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the outbound server passed a bare line-feed dot line-feed sequence through unchanged while the inbound server accepted it as end-of-data, so the two ends disagreed on where the message body stopped.

Impact

Attackers could send spoofed e-mails from millions of domains to millions of receiving servers while passing SPF alignment, though success depended on the specific combination of outbound and inbound server behaviour.

What the attacker needed

An account at a vulnerable outbound provider; inbound server accepts the bare line-feed sequence; inbound server supports SMTP pipelining

The fix

Vendors were urged to make their servers handle the end-of-data sequence consistently, and Postfix released short-term workarounds; Microsoft and GMX fixed their issues, while Cisco treated it as a feature and users were told to change the default configuration.

How it was found

  1. Register accounts at several public e-mail providers that allow sending via SMTP.
  2. Send messages containing candidate end-of-data sequences from each provider's outbound server to an inbound analysis server.
  3. Observe which outbound servers pass the sequence through unchanged and which inbound servers treat it as end-of-data.
  4. Send the crafted message to the registered addresses and check whether a separate smuggled message arrives.
  5. Inspect the received headers to confirm the SPF check passes with domain alignment.
  6. Repeat using another domain whose SPF record includes the same outbound server address.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

E-mail servers talk to each other using a simple text protocol called SMTP. A message ends when the sender sends a special marker, and the receiving server is supposed to spot that marker. Here the sending and receiving servers disagreed about what the marker looks like, so text the attacker hid inside the message was treated as new instructions, letting them send a second, fake e-mail that looked like it came from a trusted domain.

What is Smuggling / CRLF?

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.

More by Timo Longin

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.