Teardown of an invisible-text attack
Take an invisible-text attack apart: what the reader sees, what the HTML holds, and how to reveal each hiding method. See how AegisAI reads the request.

An invisible-text attack hides words in an email that the reader never sees, while filters and AI assistants still read them.12 AegisAI investigates every inbound email for what it is trying to do, through the API after delivery.3
How one email shows three different messages
A person reads what the client draws. A keyword filter reads the text it extracts. An AI assistant reads whatever text it is handed, which can include everything the client hides.2
Here is one email, taken apart. Illustrative example, fictional names and domains. It comes from billing@northwind-supply.example. The visible text reads "Quick funding for your business. Review your funding terms today." The HTML holds more.
<p>Quick fun​ding for your business.</p> ← invisible space splits "funding"
<p>Review your fun[U+E0020]ding terms today.</p> ← invisible tag character, same trick
<span style="font-size:0">[hidden instruction for an AI summary]</span> ← zero-size text
<div style="display:none">[more hidden text]</div> ← hidden element
<p style="color:#ffffff;background:#ffffff">[white text on white]</p> ← white text on whiteThe bracket in line 2 stands for one invisible character. The notes after each arrow are ours, not part of the email.
- The reader sees two short lines. The zero-size span takes no room, the div is not drawn, and the white text blends into its background.
- A keyword filter sees "fun" and "ding" split by an invisible character. A rule that matches the literal string "funding", or a pattern that does not allow for invisible code points inside a word, finds nothing.1
- An AI assistant asked to summarise the message receives the hidden spans too. In the public Gemini case, it followed them.2
Hiding with styles: zero font size, white text and hidden elements
Style tricks change how text is drawn. The text stays in the source.
Zero font size sets the text size to 0, so the words take no space. Microsoft Threat Intelligence described this in 2021 as "inserting hidden words with a font size of zero into the body of an email". The words broke up keywords that a content filter might otherwise have caught.4
White text on white sets the text colour to the background colour. In July 2025 a researcher at Mozilla's 0DIN programme showed an email with a zero-size, white span. When the user asked Gemini for a summary, it carried a fake warning that the Gmail password was compromised, with a phone number to call.2 The researcher wrote that current guard-rails "largely focus on user-visible text".2 Google said it had seen no evidence of incidents like it.5
A hidden element uses CSS display: none. The browser draws the page as though the element did not exist.6 We found no public email case that uses it. Treat it as a method to check for.
Hiding with characters: zero-width and Unicode tag characters
Character tricks add characters that no font draws.
Zero-width characters have normal layout jobs. In the Unicode Standard, U+200B ZERO WIDTH SPACE marks a place where a line may break, and U+2060 WORD JOINER stops a line break.7 Attackers put them inside words. Microsoft saw invisible characters used in 2021 "to break up keywords", including the soft hyphen (U+00AD) and the word joiner. The extra characters stay in the body, so a filter that looks for the whole word does not match.4
Unicode tag characters sit in the block U+E0000 to U+E007F. The block mirrors printable ASCII and "was originally intended for language tagging and is now largely deprecated".1 MITRE lists invisible Unicode as technique T1027.018 and says some adversaries embed AI prompt injections with it in emails or documents.8 OWASP notes that such injections "do not need to be human-visible/readable".9
The clearest public case of tag characters in email is a loan-lure campaign that Microsoft Security Research reported on 3 September 2026. It began in February 2026, ran at high volume for about three months and dropped sharply after 15 May.1 The authors say it "did not encode a hidden ASCII message in the tag block". It put one invisible character, such as U+E0020, inside a word, so "funding" became "fun", the character, "ding".1 Over 99 percent of the messages were still flagged by other layers.1 Our Threat Watch article covers the case: ASCII Smuggling: A Loan Lure That Hides Its Keywords in Invisible Text. For why exact-word rules fail, read how semantic defense catches the invisible.
Five hiding methods side by side
| Method | How it works | What it is used for | How to reveal it |
|---|---|---|---|
| Zero font size | CSS sets the size to 0 | Breaking keywords;4 hiding instructions for an AI summary2 | Search the source for font-size of 0 |
| White text on white | CSS sets text colour to the background colour | Hiding instructions for an AI summary2 | Search the source for white colour values |
| Hidden element | CSS display: none removes the element from drawing6 | No public email case found | Search the source for display: none |
| Zero-width characters | Characters such as U+200B or U+2060 sit inside a word7 | Breaking keywords4 | Scan the raw text for format characters |
| Unicode tag characters | Characters in U+E0000 to U+E007F sit inside a word1 | Breaking keywords;1 hiding instructions for AI, in the research it was adapted from1 | Scan the raw text for the tag range |
How to reveal hidden text in an invisible-text attack
Open the raw message and search it twice. This is our own check, not a vendor procedure.
- Get the raw message. In Gmail, open the email, select More, then Download message.10 In Microsoft Defender, open the Email entity page and choose More options, then Download email. It needs the Preview role and is not offered for quarantined messages.11
- Search for hiding styles. In a terminal, run
grep -oiE 'font-size:\s*0|display:\s*none|color:\s*(#fff|#ffffff|white)' message.eml. Each hit is a place to read. White text is only a hit when the background is white too. A character can also be written as an entity such as ​, so search for "&#" as well. - Scan for hidden characters. Save the four lines below as scan.py and run
python scan.py message.eml. On the illustrative example it would print U+200B ZERO WIDTH SPACE and U+E0020 TAG SPACE with their positions.
import sys, unicodedata as u
for i, c in enumerate(open(sys.argv[1], encoding="utf-8", errors="ignore").read()):
if u.category(c) == "Cf" or 0xE0000 <= ord(c) <= 0xE007F:
print(i, f"U+{ord(c):04X}", u.name(c, "unnamed"))- Judge each hit. Microsoft's first signature fired on the England, Scotland and Wales flag emoji, which use tag characters.1 In our reading, a hidden character inside a plain word, or hidden text that reads like an instruction, is the sign to escalate. If the HTML part is encoded, decode it before step 2.
The fix is to clean text before it is read. Microsoft's guidance is to "normalize before you match". That means stripping or normalizing tag characters and other invisible code points before signatures run, and before text reaches an AI assistant.1 The 0DIN report adds that teams can remove styles that hide text and scan an assistant's output for phone numbers, links and urgent language.2
How AegisAI handles an invisible-text attack
AegisAI opens every link, file and QR code in a sandbox, follows it to the end, and judges what it finds there.12 It treats a gate on a page as evidence and never scores a hidden page clean.12
The email is read through the Microsoft 365 or Google Workspace API after delivery, with no change to mail routing. A convicted message is removed from every mailbox it reached, forwards included. It starts read-only, and removal needs write access that your admin grants and can revoke.3
Neither platform page names invisible text as a detection. In our reading, a lure with split keywords still asks for the same thing, so a verdict built on the request does not depend on the keyword. For hidden instructions aimed at AI assistants, read the inbox's second reader.
Frequently asked questions
What is an invisible-text attack?
The words sit in the message, but the reader never sees them and a filter or AI assistant still reads them1. They may split a keyword or carry an instruction for an AI summary2.
Can an email hide text from me but not from an AI assistant?
Yes. In the 2025 Gemini case, the hidden text had zero size and a white colour. The assistant read it and added a fake warning to its summary2.
Are zero-width characters always a sign of attack?
No. They have normal layout jobs in the Unicode Standard7, and flag emoji use tag characters1. In our reading, the signal is a hidden character inside a plain word.
How do I find hidden text in a suspicious email?
Download the raw message, search it for zero font size, white colour and display none, then scan it for format and tag characters10. In Defender, use More options, then Download email11.
How does AegisAI handle an invisible-text attack?
AegisAI investigates every inbound email for what it is trying to do, then removes a convicted message from every mailbox it reached3. Its platform pages do not describe invisible-text detection as a separate feature.
Next steps
Run the two checks on the next suspicious message your team reports and note which hiding methods you find. To see how AegisAI reads mail you have already received, book a demo.
Sources
Each number in the text opens the source with the same number.
- 1Microsoft Security Research (Noam Kochavi, Sarah Wolstencroft)ASCII smuggling crosses over from AI prompt injection to phishing evasion, 3 September 2026
- 2Marco Figueroa0DIN (Mozilla), Phishing For Gemini, 10 July 2025
- 3AegisAIInbound email security
- 4Microsoft Threat IntelligenceTrend-spotting email techniques: How modern phishing emails hide in plain sight, 18 August 2021
- 5BleepingComputerGoogle Gemini flaw hijacks email summaries for phishing, 13 July 2025
- 6MDN Web DocsCSS display property
- 7Unicode ConsortiumThe Unicode Standard Version 16.0, Chapter 23 Special Areas and Format Characters
- 8MITRE ATT&CKObfuscated Files or Information: Invisible Unicode (T1027.018)
- 9OWASP GenAI Security ProjectLLM01:2025 Prompt Injection
- 10GoogleGmail Help, Download and send emails as attachments
- 11Microsoft LearnThe Email entity page in Defender for Office 365, updated 3 November 2026
- 12AegisAIEmail phishing prevention
Related posts
More from the AegisAI blog.
.png)