top of page

Webmail CSS Attacks Expose a Blind Spot in AI Email Defenses

Aug 11
12 min read

Google News has highlighted a webmail CSS attack seen in more than one million phishing messages since April 2026. The campaign exposes a basic conflict in AI email security. People and machines can receive the same message but read radically different content.

The reported technique, called text salting, uses Cascading Style Sheets to conceal filler text inside an HTML email. That hidden material changes how automated systems interpret the message without changing what the recipient sees.

Barracuda researchers found the technique in retail-themed phishing campaigns promising rewards, gift cards, loyalty points, or urgent redemptions. Attackers used hidden text to dilute suspicious language and make malicious emails appear safer to automated filters.

This is not simply another spam-filter evasion trick. The same visibility gap can operate in the opposite direction. Hidden instructions can target an AI assistant that summarizes email, drafts replies, searches a mailbox, or invokes connected tools.

That creates the central security tradeoff. AI email tools become more useful as they read more context and receive greater access. Those same capabilities enlarge the consequences when untrusted email content influences the model.

Traditional defenses assume the message shown to a person is broadly equivalent to the message inspected by software. CSS breaks that assumption by creating separate human-visible and machine-readable versions inside one email.

The immediate pressure falls on Google, Microsoft, email security vendors, and developers building assistants over mailbox data. They must reconcile raw message analysis with rendered content while preserving accessibility and legitimate formatting.

What the Google News Report Reveals About Text Salting

The important change is not that attackers discovered hidden text. It is that old evasion methods now work against AI-based judgment.

Text salting adds harmless or contextually unrelated words to a malicious message. Security software analyzes those words, but CSS prevents the recipient from seeing them.

Barracuda reported detecting one million attacks using these techniques since April 2026. The messages belonged to a retail-themed campaign built around rewards and redemption offers.

The attackers used several ordinary CSS properties. clip-path: inset(100%) reduced the visible area of a text block to nothing. Zero-height and zero-line-height rules removed suspicious blank space.

Other rules pushed text beyond the screen boundary. A large negative text-indent moved it thousands of pixels to the left, while overflow: hidden suppressed a revealing scrollbar.

Attackers also shrank fonts to zero. None of these properties is inherently malicious. That ambiguity makes a simple blocklist unreliable because legitimate email templates can use related styling techniques.

The campaign reportedly relied on compromised websites or lookalike domains. Some domains supported standard email authentication, including DomainKeys Identified Mail, or DKIM, which verifies that an authorized domain signed a message.

DKIM does not determine whether the content is honest. It validates domain-level message handling and integrity. A malicious operator controlling an authenticated domain can still distribute phishing.

That distinction matters because AI systems often combine many signals. Authentication, natural language, sender reputation, visible links, and message structure can each influence a classification.

Text salting manipulates the language signal. It gives a classifier a larger body of benign-looking text while leaving the phishing lure clear to the human recipient.

A filter examining the raw HTML could encounter paragraphs about unrelated business activity, customer service, or ordinary retail transactions. The recipient might see only an urgent reward notice and a button.

This creates a semantic version of adversarial input. The attacker is not necessarily exploiting a software memory flaw. The attacker is shaping the evidence used by a statistical decision system.

Generative AI also lowers the cost of producing varied filler. Attackers can create different benign passages for every message, reducing the value of exact text matching.

The Google News headline therefore points to a broader shift. Email content can now be engineered for two audiences, with one story for the user and another for the machine.

Why AI Email Filters Face a Rendering Problem

An AI model cannot judge an email reliably when its input does not match the message displayed to the recipient.

Many email security systems inspect raw message content because raw content contains valuable evidence. It exposes URLs, HTML attributes, metadata, encoded sections, and text that rendering might hide.

That approach made sense when hidden text mainly targeted keyword-based spam scoring. Defenders could search for suspicious formatting and compare visible words with the underlying source.

Large language models complicate the process. They can infer meaning across long passages, but that ability also gives hidden filler more influence over classification.

A model might see a message dominated by ordinary retail language. Its visible phishing request could occupy only a small part of the total machine-readable input.

The attack does not require the model to follow a direct command. It can succeed by shifting the apparent topic, tone, or intent enough to produce a benign classification.

Rendered analysis presents its own problems. Email clients differ in their support for HTML and CSS. A message can display differently across Gmail, Outlook, mobile applications, and specialized webmail software.

Accessibility features can also expose text that a default visual rendering hides. Screen readers, high-contrast modes, and simplified views complicate any claim about one definitive presentation.

Security tools therefore need more than a screenshot. They need a structured comparison between raw content, computed layout, accessibility output, and the elements a typical user can perceive.

The most useful question is not whether a property appears suspicious in isolation. It is whether styling creates a meaningful difference between machine interpretation and human perception.

A zero-sized paragraph containing hundreds of unrelated words is a stronger signal than a single hidden formatting label. Large off-screen blocks deserve similar scrutiny.

Defenders can also compare the linguistic meaning of visible and hidden regions. A message about loyalty rewards should not contain concealed paragraphs about unrelated invoices, travel, or customer support.

However, attackers can adapt. They can generate filler that remains close to the visible topic, reducing the semantic difference while still diluting malicious phrases.

That creates an arms race between content generation and visibility-aware detection. A filter must understand not only what the message says, but which parts matter to the person receiving it.

Machine learning is not useless here. It remains valuable for finding structural anomalies, sender patterns, campaign infrastructure, and unusual combinations of styling rules.

The problem is architectural overconfidence. A language model cannot compensate for an input pipeline that merges trusted instructions, untrusted content, and invisible material without clear boundaries.

Google has described a layered defense for indirect prompt injection. Its approach includes content classifiers, adversarial training, red teaming, and confirmation before sensitive actions.

Those controls illustrate the direction email defenses must take. No single model verdict should decide whether a message is safe, especially when CSS changes what different observers receive.

Hidden Content Can Target the Filter or the Assistant

The same CSS visibility gap supports two opposing attacks: hiding benign text from people and hiding malicious instructions from them.

Text salting tries to make a malicious email look benign to a security system. Indirect prompt injection tries to make an AI assistant obey instructions that the user never knowingly provided.

OWASP defines indirect prompt injection as malicious instructions embedded in external content that an AI system later processes. Email is a natural delivery channel because anyone can send input into many mailboxes.

An attacker can hide instructions with white text, zero-sized fonts, off-screen positioning, encoded characters, or HTML structures omitted by the visual renderer.

The victim may ask an assistant to summarize unread messages. An autonomous workflow may process the inbox without any direct request. In either case, the model can encounter attacker-authored instructions.

A simple attack might manipulate a summary. The AI could invent a security warning, suppress a phishing indicator, or describe a malicious message as approved.

A more serious attack becomes possible when the assistant can search other messages, read connected documents, draft outbound email, or call external tools.

The malicious email then acts as a control input. It can attempt to redirect the assistant from the user’s task toward data retrieval, disclosure, or an unauthorized action.

Microsoft announced inbox injection protection in Defender for Office 365 during July 2026. The capability was released in public preview for eligible customers.

Microsoft says the system detects malicious AI instructions during mail-flow inspection. Detected messages receive a high-confidence phishing verdict and can be isolated before reaching users or connected assistants.

That placement is important. Blocking an attack before delivery prevents it from entering mailbox search indexes, retrieval systems, summaries, and downstream agent context.

However, detection at the gateway cannot solve every case. An attacker can place malicious instructions in a compromised internal account, an allowed mailing list, a forwarded thread, or an attachment.

The distinction between instructions and data also remains difficult for language models. Both arrive as natural language, and both can contain requests, quoted commands, or procedural text.

An email from a manager might legitimately say, “Review the attached file and send your response.” A malicious injection can use nearly identical language while addressing the AI rather than the employee.

The assistant must infer authority, provenance, and intent. Natural-language fluency alone does not provide those security properties.

This is why the filter attack and the assistant attack belong in the same discussion. Both exploit ambiguity between displayed content, processed content, and authorized content.

Google News surfaced a story about AI-powered email defenses, but the implications extend beyond spam classification. Every mailbox-connected agent inherits this unresolved input-boundary problem.

EchoLeak Showed What Happens When Email Reaches Tools

A hidden email becomes substantially more dangerous when an AI assistant can retrieve private context and communicate beyond the mailbox.

The EchoLeak disclosure in 2025 provided a concrete warning. Researchers described a multi-stage attack involving Microsoft 365 Copilot and a carefully crafted email.

Microsoft identifies EchoLeak as CVE-2025-32711 and says the issue has been fixed. The company describes it as a cross-prompt injection technique that could expose limited data already available to a victim.

According to Microsoft’s AI security guidance, a benign-looking message could poison the context Copilot processed. The technique could then cause unintended disclosure under specific conditions.

The incident mattered because it did not depend on stealing the user’s password first. It targeted the assistant through data that the assistant was expected to read.

EchoLeak was more complex than the text-salting campaign highlighted by Google News. It involved multiple stages and conditions, while text salting primarily sought to evade classification.

Yet both cases challenge the same assumption. Email is treated as content, although parts of that content can function as adversarial instructions for AI systems.

The risk grows with retrieval-augmented generation, or RAG. This design retrieves relevant private information and adds it to a model’s context before generating an answer.

RAG helps an email assistant answer questions about projects, schedules, customers, and previous discussions. It also places valuable information close to attacker-controlled message content.

Tool access adds another layer. A summary-only assistant can mislead a user, but an agent with messaging or file tools can create direct operational consequences.

Developers often rely on a system prompt telling the model to ignore malicious instructions. That measure helps, but it does not create a hard security boundary.

A large-scale research challenge called LLMail-Inject collected 208,095 attack submissions from 839 participants. Researchers tested multiple defenses, models, and retrieval configurations in a realistic email-agent setting.

The volume of submissions matters because adaptive attackers do not repeat one obvious phrase. They probe transformations, framing, encoding, social context, and model-specific behavior.

Defenders should assume any classifier or prompt guard can generate false negatives. Sensitive actions need independent authorization controls that do not depend on the model’s interpretation.

An email summarizer should not gain permission to send messages merely because it can read them. Search access should not imply access to every mailbox folder or connected document.

Tool calls should use least privilege, which gives each component only the permissions required for its current task. High-impact actions should require explicit user confirmation.

Security teams also need logs showing which message influenced an output or action. Without provenance, an incident responder cannot easily identify the poisoned input.

Users managing source material for AI systems face a related challenge. Clear information capture and source separation can help preserve context, but application-level permissions remain essential.

The lesson from EchoLeak is not that all email assistants are unsafe. It is that their security must follow their authority, not their conversational appearance.

The Defensive Tradeoff Is Visibility Versus Utility

Removing every hidden element would reduce some attacks, but it would also damage legitimate email and leave deeper authorization failures untouched.

A strict sanitizer could strip CSS, hidden elements, remote resources, and complex HTML before an AI system reads a message. That would shrink the attack surface considerably.

It would also remove structure that helps users and models understand legitimate mail. Tables, responsive layouts, quotations, signatures, accessibility labels, and transactional formatting can carry useful meaning.

Some hidden content serves operational purposes. Preheader text can provide a short inbox preview, while responsive designs show different elements on desktop and mobile screens.

Security products must distinguish those cases from a large concealed block designed to manipulate classification. The decision cannot rely on one CSS property.

Rendering every message inside a controlled browser can improve visibility analysis. It also increases compute costs and introduces a browser engine into the security pipeline.

A rendered view still might not match every client. Mobile width, dark mode, blocked images, language settings, and accessibility preferences can all change the result.

The safer strategy uses several representations. A system can retain raw content for forensic analysis, calculate a normalized view, and separately identify hidden or low-visibility regions.

The AI classifier should receive explicit labels for those regions. Hidden material should not silently enter the same undifferentiated text stream as visible content.

An assistant could treat concealed text as untrusted metadata. It might summarize that hidden content only when the user requests a security analysis.

Prompt injection detectors provide another layer. Microsoft’s implementation inspects subjects, message bodies, HTML, styling, forwarded content, and encoded material before an assistant processes them.

Nevertheless, prompt injection detection is probabilistic. Legitimate emails can contain discussions about prompts, security testing, automation commands, or quoted malicious messages.

A research team might receive genuine attack samples by email. A security filter could quarantine those messages even when the recipient expects them.

False positives create pressure to weaken enforcement. If important mail disappears too often, administrators add exceptions that attackers can study and exploit.

Human confirmation is also imperfect. Users routinely approve requests when an interface presents them as normal steps, particularly during repetitive work.

Confirmation must therefore explain the proposed action, its target, and the data involved. A vague prompt asking whether to “continue” provides little protection.

The strongest design separates model reasoning from policy enforcement. The model can suggest an action, while deterministic software checks permissions, destinations, data classifications, and approval requirements.

This approach limits the damage from both hidden prompts and ordinary model errors. A manipulated assistant cannot exceed the boundaries enforced outside its language context.

The tradeoff is less convenience. Users may face more prompts, narrower integrations, and slower automation for high-risk tasks.

That friction is justified when an assistant can send external messages, retrieve confidential documents, modify records, or initiate financial workflows. Low-risk summaries can retain lighter controls.

AI email tools should therefore use graduated authority. Reading a selected message, searching a folder, drafting a reply, and sending that reply should remain separate permission levels.

What Security Teams Should Watch Next

The next phase will be measured by detection quality, permission design, and evidence of real-world abuse rather than another model benchmark.

The first signal is broader availability of visibility-aware email inspection. Microsoft’s public preview shows that prompt injection is becoming a distinct mail-security category.

Security teams should watch how vendors expose these detections. Useful products will identify the hidden region, explain its role, and preserve evidence for investigation.

A generic phishing verdict is not enough. Analysts need to know whether a message contained CSS-hidden filler, an encoded instruction, suspicious tool directives, or an unusual mismatch between visible and raw content.

The second signal is how Google, Microsoft, and third-party developers limit mailbox-connected agents. Model upgrades matter less than enforceable boundaries around retrieval and tool use.

Buyers should ask whether assistants distinguish external messages from internal instructions. They should also ask whether retrieved content preserves sender identity, location, and trust level.

Administrators need controls for specific actions. A policy should allow summarization without automatically allowing outbound mail, file access, calendar changes, or third-party API calls.

The third signal is verified evidence of exploitation. Barracuda’s text-salting data shows deployment at scale against filters, but it does not establish that every message defeated an LLM-based product.

Vendors should publish methodology and denominators where possible. Detection counts alone do not reveal delivery rates, successful classifications, victim interaction, or downstream compromise.

The same caution applies to prompt injection demonstrations. A laboratory attack proves a security path exists, but production controls can change its practical reliability.

Conversely, the absence of public incidents does not prove safety. AI-agent manipulation can resemble ordinary user activity, making incidents difficult to identify without detailed logs.

Organizations do not need to wait for perfect measurements. They can start by mapping every workflow that lets AI process inbound email or retrieve mailbox context.

Teams should document what each assistant can read, what tools it can call, and which actions require approval. They should also test messages containing hidden and off-screen content.

Security exercises should include both attack directions. One test should hide benign filler to evade classification. Another should hide malicious instructions intended for the assistant.

Developers should evaluate whether the system explains uncertainty. An assistant that detects conflicting or concealed instructions should stop and identify the suspicious source.

Users should remain skeptical of AI-generated warnings inside email summaries. A polished alert can originate from attacker-controlled content even when the interface belongs to a trusted provider.

For informational workflows, keep original sources available and inspect consequential claims before acting. AI summaries should accelerate review, not replace provenance.

Google News brought renewed attention to webmail CSS attacks, but the lasting issue is larger than one campaign. Email now carries content for people, classifiers, retrieval systems, and autonomous tools.

Those audiences do not perceive the same message. Until security systems model that difference directly, attackers will keep using the gap between what humans see and what machines read.

Get your work moving in remio

See what needs your attention and take the next step in Workspace.

remio currently supports Windows 10+ (x64) and Macs with Apple silicon.

Your AI Partner at Work
Get more done with remio

Plan. Create. Deliver.
All in one place.

bottom of page