Kobold Letters - Why HTML emails are a risk to your organization
HTML emails can contain CSS that hides or shows content depending on whether the email has been forwarded, so a forwarded email can change its appearance to reveal a phishing message. An attacker could send an innocent-looking email that becomes a fraudulent request only after the victim forwards it, making the recipient trust the sender.
Published on lutrasecurity.com
Anyone who has had to deal with HTML emails on a technical level has probably reached the point where they wanted to quit their job or just set fire to all the mail clients due to their inconsistent implementations. But HTML emails are not just a source of frustration, they can also be a serious security risk.
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
Email clients allow CSS in HTML emails to use selectors that depend on the DOM structure, which changes when an email is forwarded, so content can be shown or hidden based on forwarding context.
Impact
An attacker could trick a recipient into trusting a forwarded email and potentially transfer money or take other harmful actions, though the attack relies on the victim forwarding the email and may be limited by client-specific CSS handling.
What the attacker needed
Victim forwards the email; email client supports HTML and CSS; attacker can send email to victim
How it was found
- Craft an HTML email with a hidden element that becomes visible when the email is forwarded, using CSS selectors that match the forwarded DOM structure.
- Send the email to a victim; it appears harmless in the original context.
- The victim forwards the email to another person.
- The recipient sees the previously hidden content, which can be a phishing message.
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.
When you forward an email, the email program often adds extra formatting around the original message. The attacker uses CSS (the language that controls how web content looks) to make certain parts of the email visible only when that extra formatting is present. So the email looks harmless to the person who forwards it, but the person who receives the forward sees a different, malicious message.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.