Skip to content
Smuggling / CRLF Write-up Intermediate

Old new email attacks

The article describes how email address parsers in Python, JavaScript, and C# allow non-printable characters inside bracketed domain literals, enabling CRLF injection into SMTP commands. It also shows that inconsistent parsing of the From header across providers like Gmail and Outlook allows email spoofing.

Vsevolod Kokorin Follow

Published on blog.slonser.info

This article will be dedicated to my research in the field of email service attacks, including all aspects related to email messages.

Vsevolod Kokorin (slonser_), on blog.slonser.info

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 email address parsers fail to enforce RFC restrictions on characters inside domain literals, allowing control characters that break out of the address context.

Impact

An attacker could send emails with arbitrary content to any address, which could be used in phishing attacks; the article also notes that email spoofing is possible due to inconsistent parsing across providers.

What the attacker needed

Control over the recipient email address; vulnerable email library or service

How it was found

  1. Create an email address with a bracketed domain containing a carriage return and line feed.
  2. Pass this address to a function that sends email, such as C# MailAddress.
  3. Observe that the newline characters are not removed and appear in the SMTP conversation.
  4. Insert SMTP commands like RSET, MAIL FROM, RCPT TO, and DATA after the newline.
  5. The server executes the injected commands, sending an arbitrary email.

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.

Email addresses have a special part in square brackets that is supposed to hold a domain name. Some programs that read email addresses do not check this part carefully, so an attacker can sneak in secret line breaks. Those line breaks can trick the email server into running extra commands, like sending a fake message from the company.

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 Vsevolod Kokorin

View all

2 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

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.