PortSwigger Researcher Exposes CSS Flaws in Major Webmail Providers

2 min read
Source: The Hacker News
PortSwigger Researcher Exposes CSS Flaws in Major Webmail Providers
Photo: The Hacker News
TL;DR

Gareth Heyes of PortSwigger presented research at Black Hat USA 2026 detailing how CSS and HTML flaws in webmail interfaces can be exploited to steal credentials and tokens. The techniques affect Outlook, Gmail, Fastmail, Proton Mail, Yahoo Mail, and AOL Mail, allowing attackers to bypass sanitizers and manipulate user interfaces or AI tools. While some vendors have patched specific bugs, others remain vulnerable, prompting recommendations for stricter sandboxing and CSS validation.

Key points

  • Gareth Heyes demonstrated attack chains that exploit CSS and HTML to escape email message boundaries and interact with trusted webmail interfaces.
  • An Outlook and Firefox chain spoofs a Microsoft sign-in screen to capture passwords, leveraging label elements and media-query parsing tricks.
  • Yahoo and AOL Mail vulnerabilities allow attackers to reconstruct email-login tokens via a paste race condition in Firefox, enabling account takeover.
  • Gmail and Cowork AI chains use image-set() fallbacks and prompt injection to exfiltrate Slack tokens through connected AI assistants.
  • Fastmail and Proton Mail flaws include CSS hotwiring, image-proxy bypasses, and IP address exposure, though some issues were fixed before publication.
  • The research recommends isolating HTML emails in sandboxed iframes and strictly restricting CSS, custom attributes, and image requests.

Background

This research follows a trend of sophisticated webmail and credential theft campaigns, including the Zimbra zero-day exploitation by Russian spy groups and the ClickLock malware targeting macOS users. Previous incidents highlighted the risks of untrusted networks and fake verification pages, while the current findings focus on inherent flaws in how webmail providers handle email content and CSS.

Why it matters

These vulnerabilities expose critical weaknesses in how webmail providers sanitize and render email content, potentially allowing attackers to steal credentials, tokens, and sensitive data without direct user interaction. The integration of AI tools into email workflows adds new attack vectors, emphasizing the need for robust isolation and validation in webmail interfaces to protect user data and prevent account takeover.

What to watch

Webmail providers are expected to implement stricter sandboxing and CSS validation based on the research recommendations. Vendors like Fastmail and Proton Mail have already addressed some issues, but Outlook and Gmail remain vulnerable to certain attacks. Users should monitor for patches and consider using passkeys or MFA to mitigate risks.

Share this article

Want the full story? Read the original reporting

Read on The Hacker News