New Email Scam Hiding in Plain Sight: CSS Attacks Can Steal Your Webmail Password
Most people know to watch out for suspicious email attachments or links that look "a little off." But new research presented at Black Hat USA 2026 reveals a far sneakier threat — one that doesn't require you to click anything suspicious at all. Just opening or interacting with a carefully crafted email in your browser-based webmail account could be enough to hand an attacker your password.
The culprit? Something called CSS — the styling language that controls how text looks on a webpage. It's supposed to be completely harmless. Researchers just proved it isn't.
What Happened, in Plain English
PortSwigger researcher Gareth Heyes demonstrated a series of attack chains against some of the world's most popular email services: Outlook, Gmail, Fastmail, Proton Mail, Yahoo Mail, and AOL Mail. The core finding is that an email's styling code — the stuff that just makes words bold or changes a font color — can be weaponized to break out of the email itself and interact with the trusted interface around it.
Think of it this way: when you open webmail in a browser, the email sits inside your inbox interface. Security teams assume a wall exists between the email's content and the rest of the page. Heyes found ways to knock holes in that wall using only CSS.
The results are alarming:
Outlook + Firefox: An attacker's email can disguise a dropdown menu as a Microsoft password field. Because of the way Firefox handles that dropdown, The Hacker News reports the attack can capture whatever the victim types in something close to real time — essentially spoofing a sign-in screen inside your inbox.
Yahoo Mail + AOL Mail: In Firefox, HTML pasted into an email draft can briefly keep its active styling before it's stripped out. An attacker can exploit that tiny window. In a demonstrated example, they initiated a login-via-email flow for a Medium account, tricked the victim into pasting content into a draft, and used that brief moment to leak a 12-character login token — enough to sign in as the victim.
Gmail + AI email tools: Gmail's image-loading behavior could trigger an external request even after sanitization. Heyes chained this into an attack on Anthropic's Claude Cowork through a connected Gmail integration. The injected instructions caused the AI to retrieve a Slack login token and place it in a draft — and simply viewing that draft leaked the token to the attacker.
As of August 6, 2026, when the research was published, the Outlook label-jacking technique and Gmail's image-set() bypass were both still working. Fastmail patched two bugs Heyes reported, and a Proton Mail bypass stopped working before publication, but the paper does not confirm whether the full Outlook password-capture chain was fixed.
The AI Twist That Makes This Even More Concerning
There's a subplot here worth paying attention to, especially for small businesses experimenting with AI tools: the same research demonstrated that CSS inside an email can show humans one piece of text while an AI reading the same email sees something completely different.
In a demonstration against OpenAI's Atlas AI browser, Security Affairs reports that hidden CSS instructions caused the AI to open tabs and encode the victim's name in URL fragments — all while the human user saw nothing unusual. If you've connected an AI assistant to your inbox to summarize emails or take actions on your behalf, that AI can become an unwitting accomplice in an attack you never saw coming.
This isn't theoretical anymore. Proof-of-concept code for these techniques was published publicly alongside the research.
What You Can Do Right Now
None of this requires a computer science degree to defend against. Here are practical steps every email user — and every Yuba City small business — should take today:
1. Use a Dedicated Email App Instead of Browser-Based Webmail When You Can
The attacks described in this research target webmail — email accessed through a browser tab. Native desktop apps like Outlook (the installed application, not Outlook in a browser) and mobile email apps have different rendering environments that don't share the same attack surface. If your team checks email primarily through a browser, consider switching to a dedicated client where possible.
2. Turn On Two-Factor Authentication — Seriously, Do It Now
Several of these attacks steal passwords or login tokens. Two-factor authentication (2FA) means a stolen password alone isn't enough. Even if an attacker captures your credentials, they still can't get into your account without the second factor. Enable 2FA on every email account you own: Google, Microsoft, Yahoo, and others all support it. It takes about five minutes and dramatically raises the cost of any attack.
3. Be Suspicious of Unexpected Login Prompts Inside Your Inbox
This is the clearest takeaway from the Outlook attack: a fake Microsoft sign-in screen appeared inside an email. If you're already logged into your webmail and something inside an email is asking you to sign in again, stop. That is not normal behavior. Close the tab and go directly to the service's official website to log in from scratch.
4. Be Careful About Pasting Content While Using Webmail
The Yahoo Mail and AOL Mail attacks required the victim to paste content into a draft. If an email or any external source is guiding you to copy something to your clipboard and paste it into your email, treat that as a major red flag. Legitimate services don't work this way.
5. Think Twice Before Connecting AI Tools to Your Inbox
If you're using an AI assistant that has access to your email — reading messages, summarizing threads, or taking actions on your behalf — you're extending your attack surface. The Gmail/Cowork chain in this research is a perfect example of how AI tools can be manipulated to do an attacker's bidding without the user realizing anything is wrong. Audit which apps have access to your email account and remove any you don't actively need.
The Bigger Picture
What makes this research unsettling isn't that there's a brand-new mystery exploit circulating in criminal forums. No malicious exploitation was reported alongside this research. What's unsettling is that the styling code in an email — something that has been considered essentially decorative for decades — has a meaningful attack surface that most email providers haven't fully locked down.
Fastmail moved quickly to patch what was reported. Proton Mail's bypass stopped working before publication. But as of the research's release date, two of the biggest services in the world — Outlook and Gmail — still had unresolved components.
The practical message is simple: the most reliable defense isn't waiting for every provider to patch every possible CSS trick. It's making sure that when an attacker does get a password or token, it isn't enough to get them all the way in. Two-factor authentication on every account, a healthy suspicion of login prompts inside emails, and a native app where possible are all steps that stay effective regardless of which new technique researchers discover next year.
If you're a local business owner unsure whether your team's email setup is following current security best practices, our business IT team is happy to take a look.
---CONTENT_MARKDOWN---