Mailsploit: a sender spoofing bug in over 30 email clients
Email clients failed to correctly handle specially crafted sender addresses, so an attacker could make a message appear to come from any address they chose. Because mail servers did not detect the trick, spoofing protections such as DMARC, DKIM, SPF and spam filters were bypassed, and some clients were also open to XSS and code injection.
- Fixed in 7 months
- Disclosed after 21 months
Mailsploit is a collection of bugs in email clients that allow effective sender spoofing and code injection attacks. The spoofing is not detected by Mail Transfer Agents (MTA) aka email servers, therefore circumventing spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters.
Bugs were found in over 30 applications, including prominent ones like Apple Mail (macOS, iOS and watchOS), Mozilla Thunderbird, various Microsoft email clients, Yahoo! Mail, ProtonMail and others.
In addition to the spoofing vulnerability, some of the tested applications also proved to be vulnerable to XSS and code injection attacks.
More informations are available on mailsploit.com
Impact
It allows the attacker to display an arbitrary sender email address to the email recipient while bypassing spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters.
What the report shows
Mailsploit is a collection of bugs in email clients that allow effective sender spoofing and code injection attacks. The researcher, pwnsdx, reported it through the Internet Bug Bounty programme on HackerOne, where it was rated high severity with a CVSS score of 7.4 and classified as a User Interface (UI) Misrepresentation of Critical Information. It was disclosed on 19 September 2019.
The central claim is that the spoofing is not detected by Mail Transfer Agents (MTA), that is, email servers, and therefore circumvents spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters. In other words, the forged sender survives the checks that are supposed to catch forged senders.
The bugs were found in over 30 applications, including prominent ones like Apple Mail (macOS, iOS and watchOS), Mozilla Thunderbird, various Microsoft email clients, Yahoo! Mail and ProtonMail. In addition to the spoofing vulnerability, some of the tested applications also proved to be vulnerable to XSS and code injection attacks. The report points readers to mailsploit.com for more information.
The report does not include the individual payloads, the affected versions, the vendor responses or the fix details. It also does not state a bounty amount.
Root cause
The report says the spoofing is not detected by the MTAs, so the message passes DMARC (DKIM/SPF) and spam filtering, yet the client still renders an arbitrary sender address to the recipient. The spoofing is not detected by the MTAs, so the message passes DMARC (DKIM/SPF) and spam filtering, yet the client still renders an arbitrary sender address to the recipient. The report does not name the specific parsing flaw or the header involved.
Impact
An attacker can display an arbitrary sender email address to the email recipient while bypassing spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters. The attacker can display an arbitrary sender email address to the recipient while bypassing DMARC (DKIM/SPF) and spam filters. The report does not describe the consequences of those injection issues in detail.
How this kind of bug works
Email sender identity is carried in headers, and different components in the delivery chain read those headers with different parsers. Authentication schemes such as SPF, DKIM and DMARC validate a domain, not the friendly display name, and they operate on the message as the server sees it. The client then has to turn the raw header into something a person reads: it may decode encoded words, strip comments, handle quoted strings, split on separators, or fall back to a display name when parsing fails. Any divergence between the server's interpretation and the client's interpretation creates room for a message that authenticates as one identity but is displayed as another. The same divergence, when a client mishandles special characters or markup in a header, can turn into injection.
Defences work by making the displayed identity match the authenticated one: strict and consistent header parsing, showing the real address alongside or instead of the display name, warning on lookalike or mismatched domains, and treating header content as untrusted data rather than markup.
How to test for it
- Identify where sender identity is rendered: inbox lists, message view, reply and forward headers, notifications and mobile clients.
- Send test messages to yourself through a real mail server so that SPF, DKIM and DMARC are evaluated, rather than injecting messages directly into a mailbox.
- Vary the From header systematically: display names with special characters, quoted strings, comments, encoded words, unusual whitespace and separators, and combinations that could make a parser disagree with itself.
- Compare three views for each message: what the raw header contains, what the server's authentication results say, and what the client displays to the recipient.
- A positive result is a message that passes authentication for one domain while the client shows a different, attacker-chosen address, or header content that the client renders as active markup.
Common false positives are messages that fail authentication but are still displayed with the forged name (that is ordinary spoofing, not a bypass), display names that merely look similar to an address without being one, and differences that appear only in a client's raw source view rather than its normal rendering. Confirm the result on a second client and with a fresh message before reporting.
How it is fixed
Where the authenticated identity and the displayed identity can differ, the interface should make the real address visible and flag the mismatch.
Hunting notes
This class of bug hides wherever a value is parsed by one component and displayed by another: mail clients, webmail, notification systems, chat and calendar invitations, and any product that shows a name derived from an untrusted header. Recon signals include clients with custom header rendering, support for encoded words or rich display names, and features that surface sender identity outside the main message view. To get a report accepted, show the full path: the raw message, the authentication result, and the rendered output side by side, and demonstrate that the forged identity survives the server-side checks. Keep the proof minimal and reproducible, and note which clients are affected so the impact is clear.
What happened, in plain words
Mailsploit is a collection of bugs in email clients that allow effective sender spoofing and code injection attacks. The researcher, pwnsdx, reported it through the Internet Bug Bounty programme on HackerOne, where it was rated high severity with a CVSS score of 7.4 and classified as a User Interface (UI) Misrepresentation of Critical Information. It was disclosed on 19 September 2019.
An email client is the program you use to read and write mail: Apple Mail, Thunderbird, Outlook, a webmail page in your browser. Sender spoofing means making a message look like it came from someone it did not. Code injection means slipping content into a message that the client treats as active code rather than plain text.
The central claim is that the spoofing is not detected by Mail Transfer Agents (MTA), that is, email servers, and therefore circumvents spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters. In other words, the forged sender survives the checks that are supposed to catch forged senders.
Think of it like a parcel. The post office checks the return address on the label, and the label passes inspection. But the person receiving the parcel reads a different line on the same label and believes it came from somewhere else. Both parties looked at the same label and reached different conclusions.
The bugs were found in over 30 applications, including prominent ones like Apple Mail (macOS, iOS and watchOS), Mozilla Thunderbird, various Microsoft email clients, Yahoo! Mail and ProtonMail. In addition to the spoofing vulnerability, some of the tested applications also proved to be vulnerable to XSS and code injection attacks. The report points readers to mailsploit.com for more information.
The report does not include the individual payloads, the affected versions, the vendor responses or the fix details. It also does not state a bounty amount.
Why it happens
The report says the spoofing is not detected by the MTAs, so the message passes DMARC (DKIM/SPF) and spam filtering, yet the client still renders an arbitrary sender address to the recipient. The spoofing is not detected by the MTAs, so the message passes DMARC (DKIM/SPF) and spam filtering, yet the client still renders an arbitrary sender address to the recipient. The report does not name the specific parsing flaw or the header involved.
A header is a labelled line at the top of an email, such as the From line that carries the sender. Parsing means reading that line and working out what it means. Two programs can read the same line and disagree, especially when the line contains special characters, quoting or encoded text. That disagreement is the gap the bug lives in.
What an attacker gets out of it
An attacker can display an arbitrary sender email address to the email recipient while bypassing spoofing protection mechanisms such as DMARC (DKIM/SPF) or spam filters. The attacker can display an arbitrary sender email address to the recipient while bypassing DMARC (DKIM/SPF) and spam filters. The report does not describe the consequences of those injection issues in detail.
Phishing is a message that pretends to be from someone you trust, usually to get you to click a link or hand over information. If the sender line can be forged past the server checks, the usual warning signs become much harder to spot.
In general, how this kind of bug works
Email sender identity is carried in headers, and different components in the delivery chain read those headers with different parsers. Authentication schemes such as SPF, DKIM and DMARC validate a domain, not the friendly display name, and they operate on the message as the server sees it. The client then has to turn the raw header into something a person reads: it may decode encoded words, strip comments, handle quoted strings, split on separators, or fall back to a display name when parsing fails. Any divergence between the server's interpretation and the client's interpretation creates room for a message that authenticates as one identity but is displayed as another. The same divergence, when a client mishandles special characters or markup in a header, can turn into injection.
A domain is the part after the @ sign, like example.com. A display name is the friendly label shown next to the address, like "Your Bank". SPF, DKIM and DMARC are checks that ask whether a message really came from the domain it claims. They are useful, but they answer a narrower question than the one a person asks when glancing at their inbox.
Defences work by making the displayed identity match the authenticated one: strict and consistent header parsing, showing the real address alongside or instead of the display name, warning on lookalike or mismatched domains, and treating header content as untrusted data rather than markup.
How to test for it
- Identify where sender identity is rendered: inbox lists, message view, reply and forward headers, notifications and mobile clients.
- Send test messages to yourself through a real mail server so that SPF, DKIM and DMARC are evaluated, rather than injecting messages directly into a mailbox.
- Vary the From header systematically: display names with special characters, quoted strings, comments, encoded words, unusual whitespace and separators, and combinations that could make a parser disagree with itself.
- Compare three views for each message: what the raw header contains, what the server's authentication results say, and what the client displays to the recipient.
- A positive result is a message that passes authentication for one domain while the client shows a different, attacker-chosen address, or header content that the client renders as active markup.
Step 2 matters because the whole point is to test the checks, not to skip them. If you drop a message straight into a mailbox, you never learn whether the server would have caught it. Step 4 matters because the bug is a disagreement: you need all three views side by side to show that the server and the client saw different things.
Common false positives are messages that fail authentication but are still displayed with the forged name (that is ordinary spoofing, not a bypass), display names that merely look similar to an address without being one, and differences that appear only in a client's raw source view rather than its normal rendering. Confirm the result on a second client and with a fresh message before reporting.
How it is fixed
Where the authenticated identity and the displayed identity can differ, the interface should make the real address visible and flag the mismatch.
Where to look for more
This class of bug hides wherever a value is parsed by one component and displayed by another: mail clients, webmail, notification systems, chat and calendar invitations, and any product that shows a name derived from an untrusted header. Recon signals include clients with custom header rendering, support for encoded words or rich display names, and features that surface sender identity outside the main message view. To get a report accepted, show the full path: the raw message, the authentication result, and the rendered output side by side, and demonstrate that the forged identity survives the server-side checks. Keep the proof minimal and reproducible, and note which clients are affected so the impact is clear.
Glossary
- Email client: the program or web page you use to read and send email.
- Sender spoofing: making a message appear to come from an address or person it did not come from.
- Code injection: getting content into a message that the client treats as active code instead of plain text.
- MTA (Mail Transfer Agent): an email server that moves messages between systems.
- Header: a labelled line at the top of an email, such as the From line carrying the sender.
- Parsing: reading a piece of text and working out its meaning according to a set of rules.
- DMARC: a policy that tells receiving servers what to do with mail that fails sender authentication.
- DKIM: a check that uses a cryptographic signature to confirm a message came from the claimed domain.
- SPF: a check that lists which servers are allowed to send mail for a domain.
- Domain: the part of an address after the @ sign, such as example.com.
- Display name: the friendly label shown next to an email address.
- XSS (Cross-Site Scripting): a bug where attacker-supplied content is run as code in a page or client.
- Phishing: a message pretending to be from someone trusted, usually to steal information or clicks.
- CVSS: a scoring system that rates the severity of a security bug.
- False positive: a test result that looks like a bug but is not one.