Browser security firm LayerX found a new "visual fraud" attack aimed squarely at AI assistants
Cybersecurity firm LayerX has discovered a new type of "visual fraud" attack.
It can silently target AI assistants, and nearly all of them are vulnerable.
The attack exploits the gap between what a human sees and what an AI assistant reads, tricking the AI into vouching for malicious commands.
When you ask an AI assistant to assess a webpage, the AI and a human see the page in fundamentally different ways:
Attackers exploit this difference with a two-step combination:
The result:
In tests from late 2025, LayerX found the attack worked against most mainstream AI assistants, including ChatGPT, Claude, Copilot, Gemini, Grok, and Perplexity.
Typical attack scenario: An attacker hosts a page claiming to offer a Bioshock cheat code. The page renders a malicious command line. The user, suspecting it's malicious, asks an AI assistant. The AI reads the underlying harmless code and says "it's safe." The user then runs it on their own machine, giving the attacker control.
Same webpage: you see a dangerous command, the AI sees fanfiction
Browser security firm LayerX has documented a trick aimed at the "let the AI check if this is safe" workflow: a custom font and a few lines of CSS can make the same webpage show different content to a person versus an AI. In the past, hidden instructions embedded in a page were used to trick the AI itself. This time, it's inverted — the page tells the truth to the AI and lies to the human, making the AI a character witness.
Researchers set up a demo page themed around a Bioshock fanfiction story, promising that following the on-screen steps would reveal a hidden cheat code. The screen shows four lines of large green text, starting with "Would you kindly" — a nod to the mind-control phrase from Bioshock, used here as a hook. The text instructs you to open a terminal and type a command. That command is a reverse shell: you actively connect out to the attacker's machine, and once connected, they can execute anything on your computer. This is more reliable for attackers than trying to breach inbound, because outbound connections are typically not blocked by firewalls.
Below is the real rendered screenshot released by the researchers — what the victim would actually see on their screen.
In December 2025, LayerX tested the page against 11 AI assistants: ChatGPT, Claude, Copilot, Gemini, Grok, Perplexity, Leo, Sigma, Dia, Fellou, and Genspark. None caught it. They noted that even with highly targeted prompts designed to steer the assistant toward finding a problem, the results were the same.
Three-step trick: shrink a fanfic to 1 pixel, encode a command as garbled text, use a font to turn it readable
We pulled the source code of the demo page and found that the entire trick boils down to three actions, fewer than twenty lines of code in total.
Step 1: Shrink the fanfiction to 1 pixel, black text on black background
The fanfiction paragraphs are written inside tags like this. The page's background is pure black, so black text on a solid black background, with a height of just 1 pixel, is effectively invisible. For reference, the line you're reading is about 17 pixels high; 1 pixel is roughly one-seventeenth of that.
<p style="color: #000000;font-size: 1px;">This website was created as a tribute to Bioshock</p>
There are four such 1-pixel hidden text blocks on the page. Two are long fanfiction passages (5,014 and 6,570 characters). The other two are a tribute line and a five-word phrase. They remain fully intact in the page's code, so when the AI scrapes the page, this is largely what it reads.
Step 2: The command meant for the human is written as a string of garbled text
In the center of the page is an ordinary <div> containing four lines of characters that look like a base64-encoded blob. An AI assistant seeing this would likely classify it as a "high-entropy string, unreadable without a key," and skip it as noise.
<div> vRmUwAgRmAiPjwUgARrhjAgRmbAshbVPjcUAcjwAsgrhAfcao <br>RjJhAgRmAhnhJmshwAPsAsgrh <br>fcaoADPAHBAFwhuFsJrF859E806E8E35F6266A2HB8 <br>PsAOPUUAcUUROAgRmAsRAahhAgRmbAhcashbAhWWAxbRVAMcrsmbh </div>
These four lines are the four lines of large green text on the screen. The 49 characters in the first line render exactly as "Would you kindly open your terminal and type bash" — also 49 characters.
We also found something in the source code not mentioned in the research report or the news coverage. Directly above the garbled text block, there's another 1-pixel hidden text block containing just five words: LLM Generation Seed:. In other words, the AI reads "Generation seed:" followed by a string of random characters. It doesn't have to guess what this blob is — the attacker has already provided a label for it. This section wasn't present in the source code screenshot released by the researchers, indicating the page was modified after that screenshot was taken.
Step 3: Load a font where the letter drawings are swapped
The page header loads a font file and applies it to the entire page. With 48px font size, green text, and a black background, that's exactly what appears on the screen.
@font-face {
font-family: 'fontie';
src: url('RaptureFont.ttf') format('truetype');
}
body {
font-family: 'fontie', sans-serif;
font-size: 48px;
background: #000;
color: #0f0;
}
In this font, the drawing for each letter has been swapped. The glyph named 'c' (the actual drawing of a letter within a font file) is drawn as an 'a'; the glyph named 'v' is drawn as a 'W'. So when the browser renders it, the garbled text becomes plain language.
Individually, each of the three actions is perfectly legal. CSS lets you shrink text and match it to the background color. A <div> can contain any string. A webpage is allowed to load its own fonts. No JavaScript is used anywhere, and no browser exploits are involved. Disable JS entirely and the page still works its deception.
Why doesn't the AI notice anything? Because it only reads the code; the browser loads the font and re-renders
When an AI assistant fetches a webpage, it processes the page's code — referred to technically as the DOM (the in-memory text structure your browser builds after parsing the code). It looks at the tags, the structure, and the text within. It does not run the full browser rendering engine, download font files, or compute "what shape does this letter ultimately take when drawn." LayerX calls this class of assistant "non-agentic": they fetch the page and parse the code, but they don't execute a full render or analyze the custom font's glyph mapping.
The attack hinges on an assumption everyone takes for granted: the webpage code is the content, and fonts just make it look nice. Fonts don't change the meaning of the text. This assumption almost always holds, so nobody checks it. And because it's normally safe, the trick works so well.
It's like a contract: the underlying digital document says one thing, but the printer's type blocks have been swapped. Each physical letter mold contains a different character than its label suggests. The proofreader checks the digital file; the signer reads the printed page. Both did their due diligence, but they've agreed on two different versions of the contract.
There's another consequence. The assistant doesn't just fail to spot a problem; it actively tells you "this page looks safe."
When an attacker creates a malicious page and gets an AI assistant to label it safe, they're effectively appropriating that assistant's authority and using its credibility to vouch for their claim.
LayerX Research Report (our translation)
It's important to define the scope: this attack targets assistants that "read code only without rendering." If an assistant actually renders the page and looks at a screenshot, it would theoretically see those four lines of green text. LayerX didn't test such assistants; all 11 tested fall into the former category.
We dissected the fake font: what was swapped was the letter shapes, while the mapping table is clean
The following section is independent of the LayerX report and any news coverage. We downloaded the font file used by the demo page, read its internal tables, and re-rendered the garbled text with it ourselves.
A font file contains a 'cmap' table that maps "which glyph should character 'a' use?" The most obvious way to check if a font has been tampered with is to inspect this table. The cmap in this font is completely normal: character 'a' points to glyph 'a', character '0' points to glyph 'zero', all 5,918 mappings are clean. The GSUB and GPOS tables, responsible for glyph substitution and kerning/positioning, don't exist.
What was tampered with is the outline data in the glyph ('glyf') table — i.e., how each glyph is actually drawn. The glyph named 'a' contains the drawing of an 's'. Some immediately visible metrics:
anomalies in the cmap table; all 5,918 mappings are correct
strokes are drawn for glyph 'A' — it's blank on screen, serving as a space
width of glyph 'v' — the widest among 26 lowercase glyphs, because it draws a 'W'
characters of garbled text, all matched 1-to-1, zero conflicts
Let's match the first 16 characters of the first line. The substitution pattern becomes obvious:
vRmUwAgRmAiPjwUg aligns perfectly with "Would you kindly" on screen. The two A's highlighted in red have no outlines in this font, rendering as blank spaces. Diagram made by us using fontTools for table reading and Pillow for re-rendering.The entire substitution is strictly 1-to-1. The first line has 49 characters, and the recovered sentence also has 49 characters — no more, no less. All 169 characters across the four lines match up without conflicts. Here's the character mapping:
The trick has a flaw: copying the command on screen yields garbled text, forcing manual typing
If you select the command line on screen and press copy, the clipboard receives the characters from the webpage code — the garbled string — completely different from what your eyes see. The browser copies the characters themselves, not the drawn glyphs.
Would you kindly open your terminal…
vRmUwAgRmAiPjwUgARrhjAgRmbAshbVPjcUAcjwAsgrhAfcao
This means the demo page must compel the victim to type the command manually. The on-screen verb is literally "type," and the word "copy" appears nowhere. But this limitation only applies to this specific page. An attacker could add a script to modify the clipboard, making the copied text the decoded command. So the self-check below isn't foolproof.
Conversely, this provides a ready-made self-check. Similarly, using the browser's reading mode or disabling custom fonts breaks the disguise instantly — the disguise relies entirely on the page's own font. If you switch to a system font, the text reverts to garbled characters.
Did vendors fix it? Only Microsoft did. Google downgraded after initial high severity.
LayerX reported the discovery to various vendors in December 2025 (following responsible disclosure: private notification first, public disclosure after an agreed period). Six of the seven ultimately did not fix it, but for different reasons. Four initially said it was out of scope. Google accepted it and then reversed course. Perplexity said it was a general LLM limitation. Two of them essentially said "this is social engineering, not a compromise of our systems" — security professionals classify deceptive tactics like this as social engineering.
| Vendor | Submitted | Closed | Response |
|---|---|---|---|
| Microsoft | 2025-12-16 | Pending | Accepted on Dec 17, opened a case in its Security Response Center (MSRC), the only one to fully fix the issue. The case remains open due to Microsoft's 90-day disclosure policy. |
| Anthropic | 2025-12-16 | 2025-12-16 | Per policy, "social engineering (incl. phishing)" and "content issues with model prompts and replies" are out of scope. |
| Dia | 2025-12-14 | 2025-12-16 | Not accepted per project policy: prompt injection leading to misinformation, anomalous behavior, or denial of service is explicitly out of scope. |
| OpenAI | 2025-12-16 | 2025-12-17 | The submission in its current form doesn't have enough impact for a severity rating, and this class of issue is explicitly out of scope. |
| 2025-12-16 | 2026-01-27 | Initially rated P2 (High), then downgraded and closed: determined it couldn't cause significant user harm and relied too heavily on social engineering. | |
| Perplexity | 2025-12-14 | 2025-12-17 | This is a known limitation of LLMs processing external web content, not a vulnerability in our own security controls. |
| xAI | 2025-12-16 | 2025-12-17 | Model issues are outside the scope of this program. |
It's been over seven months since the tests in December 2025. We couldn't find any public information confirming whether the other vendors have quietly fixed the issue. What we can confirm is that the demo page and font file are still online. Fetching the page in plaintext still yields only the fanfiction and the garbled text.
LayerX's proposed fix: compare rendered output to the code, and treat fonts as an attack surface
The report suggests four detection measures for vendors, plus one requirement about how assistants should phrase their responses.
The first is the most practical: one path takes only the text from the code, the other performs a full render with fonts and extracts the visible text, then compares the two. This works without any prior knowledge of the attack method — whether it's font substitution, opacity tricks, or off-screen positioning — as long as what a person sees differs from what's in the code, it gets flagged.
The fifth item is about how assistants should communicate. If an assistant can't render a page, analyze custom fonts, or compare visual vs. code, it shouldn't say "this page is safe." For this case, fixing that final sentence is cheaper than any of the other four.
The web is more than HTML. Meaning can be moved into the rendering pipeline, and any system that only analyzes text is blind by default.
LayerX Report Conclusion (our translation)
Same webpage. Human eye sees a command that gives away your computer. AI reads a video game fanfiction.
Browser security firm LayerX used a custom font and a few lines of CSS to fool 11 mainstream AI assistants. A complete visual summary below.
↓ Read it in one page · includes an animated diagram
You open an unfamiliar webpage and ask an AI, "Is this page safe?" The AI replies, "Safe, no threats detected." But on your screen, a command is displayed, instructing you to open a terminal and type it out. Once you do, the attacker can execute anything on your computer. (Technical term: reverse shell — you connect out to them, essentially opening the door and handing over the keys.)
+ an unreadable encoded string
→ "This page is safe"
open your terminal
and type bash …
→ Follow this, lose your PC
Same URL, same file. LayerX tested this demo page against 11 assistants in December 2025: ChatGPT, Claude, Copilot, Gemini, Grok, Perplexity, Leo, Sigma, Dia, Fellou, Genspark. None of them caught it, even with prompts specifically engineered to help the assistant find a problem.
The entire page is under twenty lines of code, has zero JavaScript, and uses no browser vulnerabilities. Disable all browser scripting and the page still works its magic.
We downloaded the font file from the demo page, read each table, and re-rendered the garbled text with it. One finding is surprising: the most obvious check yields nothing here.
assistants tested, all judged "page safe"
errors in the character mapping table (our verification)
characters of garbled text, all matched 1-to-1, zero conflicts
lines of JavaScript used in the attack
This disguise has an unavoidable flaw: if you select the command on screen and press copy, the clipboard gets the raw characters from the code — the garbled string. The browser copies the characters themselves, not the drawn glyphs. So this particular demo page can only trick you into typing it manually. The verb on the page is literally "type." The word "copy" appears nowhere.
- Copy-paste to compare: a mismatch means something's wrong
- Use reading mode, or disable custom fonts: with system fonts, the text reverts to garbled
- Never manually type commands from unfamiliar pages
- Don't take AI's "safe" as the only verdict – it might not have seen the text on your screen (this is from LayerX & BleepingComputer; the other three are our derived self-checks)
LayerX reported the findings to various vendors in December 2025. Six ultimately didn't fix it, but for different reasons.
| Vendor | Result | Response |
|---|---|---|
| Microsoft | Fixed | The only one to fully fix it; opened a case in its Security Response Center |
| Anthropic | Closed | "Social engineering" (deception) and model response content issues are out of scope |
| Dia | Closed | Prompt injection issues are out of scope per project policy |
| OpenAI | Closed | Impact isn't sufficient for a severity rating; this class of issue is out of scope |
| Downgraded | Initially P2 High, then downgraded 2026-01-27: determined it couldn't cause significant user harm and relied too heavily on deception | |
| Perplexity | Closed | A known limitation of LLMs processing external web content, not a vulnerability in our security controls |
| xAI | Closed | Model issues are outside the scope of this program |
Dates and responses are from the disclosure timeline in the LayerX report. Assistant tests completed in December 2025, all self-tested by LayerX. Third-party reproduction is still pending. LayerX sells browser security products, so it has an incentive to emphasize severity. We have independently reproduced the attack. As of July 30, 2026, the demo page and font file remain online; fetching it as plaintext still yields only the fanfiction and garbled text. Whether the other vendors have quietly fixed it is unknown publicly.
open your terminal
and type bash …
Run this command and your computer is theirs. Don't do it.
it says open a terminal
shrunk to 1 pixel
black text, black bg
AI still reads it
is encoded as garbled text
PjwUgARrhj…
the letter drawings
are swapped
garbled becomes readable
reads all the text in the code
- × Does NOT download font files
- × Does NOT compute letter shapes
- × Does NOT look at the screen
that line on my screen
Applies CSS, hides the story
Downloads font, redraws every letter
like opening the door and handing over the keys
It maps "character 'a' to which drawing?"
- × It's social engineering, out of scope
- × Not enough impact for a severity rating
- × A general LLM limitation
- × Google: High severity at first, then downgraded and closed
You see what the browser draws.
