← Back to Daily Briefing (#BugBounty)

Researchers from PortSwigger and SonarSource have identified a critical vulnerability class enabling CSS-based data exfiltration within major webmail clients, including Gmail, Outlook, and Yahoo. By leveraging advanced CSS attribute selectors and boundary escape techniques, attackers can bypass email sandboxing to interact with the underlying Document Object Model (DOM). This allows for the exfiltration of sensitive credentials, session tokens, and authentication data via side-channel requests—such as background-image: url()—to attacker-controlled servers. The attack vector further extends to UI hijacking and the manipulation of AI-powered email assistants, potentially leading to full third-party account takeover.

  • Vulnerability Overview: Systemic Webmail Risk

    • Shift in threat landscape from traditional phishing to sophisticated, browser-based data exfiltration.
    • Systemic vulnerability affecting nearly all major providers, including Gmail, Outlook, Yahoo, AOL, Fastmail, and Proton Mail.
    • Core issue resides in the ability of malicious CSS to escape message containers and interact with the parent application's DOM.
  • Technical Mechanics: The Exfiltration Chain

    • CSS Attribute Selectors: Attackers use specific selectors to detect characters or values within the DOM, effectively "probing" for sensitive data.
    • Boundary Escape: Implementation of techniques to break out of iframes or sandboxed message boundaries to access the root webmail interface.
    • Side-Channel Exfiltration: Use of CSS properties like background-image: url(...) to send stolen data to an external C2 server via HTTP requests.
  • Advanced Exploitation Vectors

    • UI/UX Hijacking: Manipulation of the webmail interface to trick users into performing trusted actions via CSS-based clickjacking.
    • AI Context Poisoning: Crafting HTML/CSS content designed to misdirect LLM-based email assistants, manipulating the context the AI uses to summarize or act on emails.
    • Desktop Client Integration: Research by SonarSource demonstrates attack chains in Mailspring that can lead to full system compromise.
  • Security Impact and Consequences

    • Credential Theft: Direct leakage of passwords and session tokens through DOM probing.
    • Account Takeover: Ability to chain CSS exfiltration with other vulnerabilities to achieve third-party account hijacking.
    • Privacy Degradation: Bypassing privacy-centric boundaries in services like Proton Mail to leak internal application state.
  • Defensive Implications & Mitigation

    • CSP Hardening: Implementation of strict Content Security Policies (CSP) to block unauthorized outbound requests from CSS.
    • DOM Isolation: Enhancing the isolation of email rendering engines to prevent any interaction with the parent application DOM.
    • CSS Sanitization: Rigorous filtering of attribute selectors and external URL references within embedded stylesheets.

Related posts

  1. gbhackers.com — New CSS Bomb Attacks Let Hackers Steal Passwords and Tokens From Webmail Users
  2. techjacksolutions.com — CSS Sanitizer Bypasses in Six Major Webmail Platforms Enable Credential Theft, Token Exfiltration, and AI Agent Hijacking
  3. feeds.feedburner.com — New CSS Attacks Can Break Webmail Defenses to Steal Passwords and Tokens
  4. hackernews.com — CSS: The bomb inside your inbox
  5. Cybersecurity News — CSS Bomb Attacks Turn Malicious Emails Into Password-Stealing Keyloggers
  6. Cyberrecaps
  7. Roots
  8. Youtube
  9. Sonarsource
  10. Divmagic
  11. Reddit
  12. Writeupsarchive
  13. Reg4tech
  14. Dark Reading — CSS: The Hidden Threat Lurking in Your Inbox

LINK COPIED TO CLIPBOARD