Heyes Shows 12-Character Token Theft and AI Abuse via CSS in Gmail, Outlook
Updated
Updated · Security Affairs · Aug 9
Heyes Shows 12-Character Token Theft and AI Abuse via CSS in Gmail, Outlook
3 articles · Updated · Security Affairs · Aug 9
Summary
Outlook and Gmail remained vulnerable as of Aug. 6 to CSS-based attack chains Gareth Heyes said could steal passwords, hijack sessions and leak inbox-linked data.
Heyes said the attacks work because webmail clients let untrusted HTML and CSS interact with trusted interface elements, or because browser rendering diverges from what sanitizers approve.
In Outlook, allowed labels and a CSS gadget using position:fixed let an email escape its message pane and mimic a password field; in Firefox, the setup could capture typed input nearly in real time.
Yahoo Mail and AOL Mail exposed a copy-paste path that leaked a 12-character Medium login token, while Gmail's image-set() fallback enabled an external request that fed an indirect prompt-injection chain against Anthropic's Claude Cowork.
Fastmail patched two CSS mutation bugs and a Proton Mail proxy bypass no longer worked before publication, but Heyes and PortSwigger still urged sandboxed iframes, stricter CSS allow-lists and tighter image-request controls.
If security filters and browsers interpret code differently, can any webmail platform truly guarantee that an email won't steal your passwords?
With public exploit code available, are your AI assistants silently leaking corporate secrets through seemingly harmless email formatting?
How can attackers extract your private tokens using just visual CSS tricks without ever triggering a suspicious network request?
The 2026 CSS Injection Crisis: Exploiting Webmail and AI Assistants Without JavaScript
Overview
In August 2026, Gareth Heyes revealed at Black Hat how CSS and HTML alone can be weaponized to bypass traditional email security, leading to rapid responses from some providers like Fastmail, who patched and rewarded bug discoveries, while others such as Proton Mail silently fixed issues. The report highlights how failures in sanitization, like Roundcube’s improper comment handling, enabled attackers to hide malicious CSS, and browser-specific flaws—such as Chrome’s real-time selector evaluation—allowed fast data exfiltration. These vulnerabilities extend to AI-driven tools and authentication protocols, showing that CSS-based attacks now threaten not just webmail but the broader web application ecosystem.