Recent research has unveiled a series of sophisticated attacks leveraging Cascading Style Sheets (CSS) to breach webmail defenses, potentially leading to unauthorized access to user credentials and sensitive information. These findings were presented by security researcher Gareth Heyes at the Black Hat USA 2026 conference.
The attacks exploit vulnerabilities in popular webmail services, including Outlook, Gmail, Fastmail, Proton Mail, Yahoo Mail, and AOL Mail. By manipulating CSS within HTML emails, attackers can execute a range of malicious activities:
- Password Theft: In one scenario, an attacker crafts an email that, when viewed in Outlook using Firefox, displays a counterfeit Microsoft sign-in page. Unsuspecting users entering their credentials inadvertently provide them to the attacker.
- Token Hijacking: Another attack targets Yahoo Mail and AOL Mail users. By exploiting a brief window where pasted HTML retains active CSS before sanitization, attackers can extract login tokens from services like Medium, enabling unauthorized access to victims’ accounts.
- AI Manipulation: The research also highlights vulnerabilities in AI-integrated email services. For instance, Gmail’s handling of the image-set() function can be exploited to bypass sanitization. When combined with prompt-injection techniques, attackers can manipulate AI tools like Anthropic’s Claude Cowork to extract and exfiltrate sensitive tokens, such as those from Slack.
These attacks underscore the evolving nature of email-based threats. Unlike traditional phishing methods that rely on deceptive links or attachments, these CSS-based techniques manipulate the very structure and styling of emails to execute malicious actions, often without user interaction.
While the research primarily serves as a proof-of-concept, it raises significant concerns about the security of webmail platforms. Some providers have begun addressing these vulnerabilities. Fastmail, for example, has patched two CSS mutation bugs, and Proton Mail has implemented measures to prevent proxy bypasses. However, as of the latest tests, vulnerabilities like Outlook’s label-jacking and Gmail’s image-set() bypass remain exploitable.
To mitigate such risks, webmail providers are advised to implement stringent security measures, including:
- Isolating HTML email content within sandboxed iframes to prevent it from interacting with the main interface.
- Restricting the use of CSS, custom attributes, select menus, and image requests to minimize potential attack vectors.
For users, it’s crucial to remain vigilant. Regularly updating email clients and browsers, being cautious of unexpected emails, and verifying the authenticity of login prompts can help reduce the risk of falling victim to such sophisticated attacks.
These developments highlight the need for continuous adaptation in cybersecurity practices. As attackers devise more intricate methods to exploit web technologies, both service providers and users must stay informed and proactive to safeguard sensitive information.