New research reveals CSS attacks that can break webmail defenses in Outlook, Gmail, and more, potentially stealing passwords, tokens, and hijacking AI email tools.
You probably think your email is safe. That little locked padlock icon gives you a false sense of security, right? Well, a new wave of research suggests otherwise. It turns out that the content inside an email can actually break out of its message boundary and mess with the webmail interface you're using. That's not just a minor annoyance; it's a serious security hole.
Researchers at PortSwigger, led by security expert Gareth, have uncovered attack chains that affect some of the biggest email providers out there. We're talking Outlook, Gmail, Fastmail, Proton Mail, Yahoo Mail, and AOL Mail. That's basically everyone. And the techniques aren't just theoretical; they can be used to capture passwords, take over third-party accounts, leak sensitive tokens, and even hijack trusted UI actions you think are safe.
### How Does an Email Escape Its Own Box?
Here's the thing. When you open an email, your webmail client renders it in a sandboxed area. That's supposed to keep the email's HTML and CSS from touching the rest of the page. But Gareth found clever ways to break that sandbox using CSS. By crafting specific style rules, an attacker can make elements from the email overlay or interfere with the webmail's own interface. It's like having a piece of paper that can slip out of a folder and start rearranging the desk it's sitting on.
This isn't about traditional phishing where you're tricked into clicking a bad link. This is much more subtle. The attack can alter what you see, replacing a legitimate login prompt with a fake one that steals your credentials. Or it can quietly inject extra actions into a button you trust, like "Reply" or "Forward," turning it into something malicious.
### The Real Danger: AI Email Assistants
One of the most alarming findings is how these attacks can manipulate AI tools that read your email. More and more services now use AI to summarize threads, draft responses, or even take actions on your behalf. If an attacker can control what that AI sees, they can trick it into leaking information or performing actions you never intended. Imagine asking your AI assistant to find the total amount due on an invoice, and instead, it sends your banking details to a third party. That's the kind of scenario we're looking at.
### Why This Matters for You
You might think, "I use a strong password and two-factor authentication, so I'm fine." But these attacks don't care about your password if they can just steal the session token directly from the page. Once they have that token, they're in, no login required. And because the attack happens entirely within the webmail interface, it's incredibly hard to spot. Everything looks normal because, well, it is normal—until it isn't.
### What Can You Do Right Now?
While we wait for providers to patch these vulnerabilities, there are a few things you can do to lower your risk:
- **Disable HTML rendering** in your email settings if possible. Viewing emails in plain text eliminates most of these attack vectors.
- **Be wary of unexpected emails** from unknown senders, especially if they contain complex formatting or embedded objects.
- **Keep your browser updated**. Modern browsers have built-in protections that can mitigate some of these CSS-based attacks.
- **Use an antidetect browser** for sensitive accounts. These browsers create isolated profiles, making it harder for cross-site attacks to persist.
### The Bottom Line
Email is the backbone of modern communication, but it's also a prime target. This research is a wake-up call that even the most trusted interfaces can be manipulated. The best defense is a layered one: stay informed, update your software, and don't assume that a locked padlock means you're untouchable. Security is a moving target, and this is just the latest reminder that we all need to stay on our toes.