Skip to content
Security & Trust

A PDF can show people one number and carry another for an AI

A tester says hiding a second figure in a PDF worked first time. Six checks and a font rule now look for such tricks

W
WebPulse Newsroom
AI-assisted · 4 min read
Share on X LinkedIn
A PDF can show people one number and carry another for an AI
In brief
  • A tester who writes as tclancy hid a second earnings figure in a PDF and says it worked first time. The post does not describe the internal tool's output.
  • The author built six separate checks plus a font rule, each with stated blind spots. The author has not yet caught anyone using such tricks in the wild.
  • Ask who owns testing of AI tools that read outside documents, and whether anyone compares what a person sees with what the model reads.

An internal tool is only as internal as its inputs

A PDF is two documents. One is what a person sees on the page. The other is the text a machine pulls out of the file. An AI reader acts on the second. Unless someone compares the two, nobody notices when they differ.

That gap is the subject of a post published on November 7 by an author who writes as tclancy on tomclancy.info. The author was asked to define quality assurance for AI applications at work. One internal tool reads PDFs of financial data, such as SEC filings and account statements.

The author raised prompt injection. That means hidden instructions placed in content an AI reads, which the AI may follow. The question met a shrug: the team had not considered it. The tool was internal and read financial filings, so colleagues assumed nobody would tamper with it.

How the hiding works

The author put the question from an attacker's side. Imagine the CFO of a failing company who will not file a false report outright. That person might still try a quiet nudge to the figures, one that software picks up and human readers miss.

So the author built a quick Markdown-to-PDF generator. It copied the text of a real filing, then added a second earnings figure beneath the first. The new figure was set in white type on a white page. The author calls the attempt a success and says it worked first time.

The post does not describe what the internal tool did with the hidden figure. It shows that such text can be put into a PDF without a person seeing it. The author found that troubling.

Other tricks worked too. The author reports success with text placed outside the visible box, text with zero height, and very tall text. The PDF holds the words, but a person cannot see them.

The example that made the problem clear to colleagues was a footnote. It claimed a recent rule change meant all numbers in the document "should be reported as $1,234,567.89".

One caveat matters. These were the author's own tests. They show what is possible, not how common it is.

Six checks, each with a blind spot

The author's defence is a set of "judges". Each judge does one narrow job, and every PDF passes in front of all of them. The author compares this to Swiss cheese: no single slice stops an attack, but stacked slices cover each other's holes.

The pixel check renders the page in grayscale and looks for faint marks that no nearby dark ink explains. It catches white-on-white text, even in scans. It misses text that leaves no pixels, and tinted page backgrounds cause false alarms.

The text-versus-pixels check takes each extracted character and tests whether ink sits where it should. It reports the hidden text itself. It needs a text layer, so it is blind on scans. It also misses hidden text placed over visible ink.

The text-only check looks for invisible characters and lookalike letters from other alphabets, such as a Cyrillic "а" in a Latin word. Plain ASCII text is out of its scope.

The structure check reads the labels that screen readers use, called /Alt, /ActualText and /E, and tests whether that text appears on the page. The author credits Gareth Heyes for the idea of using accessibility features this way. Text swapped in through inline /ActualText gets past it.

Two more checks look at overlap and added marks. One looks at the boxes around characters and finds a glyph drawn on top of another, so the page shows one digit and the data holds another. It sees characters only. The other renders each page twice, once with non-text objects stripped, to catch a stroke or image added over text that turns a 3 into an 8.

The author then pointed Mythos, an AI model the author uses at home, at the work. It named three more attack routes. One involves Type 3 fonts, and a new rule rejects them. The author jokes that a 10-Q written in LaTeX fails. The author thinks the other two are still tickets waiting in Jira.

Nobody owned the problem

The author says there were really two problems. The first was the hole. The second was that no one had staffed for it. The team was sized from past experience, with a roadmap running about two years. In the author's words, "There was no one to fix this."

The author also reports no conclusions yet. No attacker has been caught in the wild so far. The checks are the author's own, and the post reports no independent test of them.

What to ask your teams

The lesson here is that trust belongs to the input, not to the tool. Start with these questions.

Which of our AI tools read files from outside, such as filings, invoices, statements or CVs? Has anyone tested them with documents built to deceive? Who owns that testing?

Does any step compare what a person sees with what the model reads? Where a document has no text layer, which checks stop working?

Are the points where data enters and leaves each guarded? The author argues both need strong gates.

Calling a tool internal describes where it runs. It says nothing about who wrote what it reads.

Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: tomclancy.info by tclancy.