Hidden Prompt Injections in Financial PDFs, and Where a Scrub Step Fits A researcher at tomclancy.info demonstrated prompt-injection attacks against an LLM tool that parses financial PDFs, using hidden text, white-on-white ink, glyph overlap and Unicode tricks to make the model report figures not present in SEC filings or account statements. The researcher built six PDF-level detectors — HiddenInk, Text Raster Divergence, Unicode Obfuscation, Accessibility Channel, Glyph Overlap and Non-Text Ink — and a separate text-scrubbing layer (Sentinel's /v1/scrub) is proposed to scan extracted text before it reaches the model. The write-up notes that scrubbing cannot catch injections written as ordinary financial prose, which it frames as a data-integrity problem requiring human verification against the source. A QA engineer pointed an internal LLM tool at financial PDFs SEC filings, account statements and made it report numbers that weren't in the document. The tool did what it was built to do. It read the PDF, and the attacker had written some of the PDF for it. This is a research write-up, not a breach. The author, writing at tomclancy.info https://tomclancy.info/joshua-judges-ruth.html , demonstrated the attack against a tool that parses financial documents, then built a set of mechanical PDF-level detectors to catch it. The piece got almost no traction on HN 1 point, 0 comments , which is a shame, because the underlying problem is one most document-ingestion pipelines have. The demonstrated techniques all do the same thing: put text in the PDF that an LLM will see and a human reviewer won't. The goal in the demo was to get the model to state numbers the document doesn't contain. For a tool people use to read filings and statements, wrong numbers delivered confidently are the worst outcome. A reviewer skimming the rendered PDF sees a normal document. The text extractor feeding the LLM sees the normal document plus a paragraph of instructions. A PDF text extractor has no idea what's visible. It pulls characters out of content streams. Color, height, and position are rendering concerns the extractor doesn't weigh, so everything lands in the prompt as one undifferentiated string. Then the model gets that string. System prompts that say "only report figures from the document" don't help, because the injected text is part of the document as far as the model can tell. Instructions and data arrive in the same channel. The author's response is a layered "Swiss cheese" approach, six judges that each look for one kind of PDF-level trick: HiddenInk, Text Raster Divergence, Unicode Obfuscation, Accessibility Channel, Glyph Overlap, and Non-Text Ink. That's sound engineering. Each judge has holes, and stacking them is how you cover the holes. I'm not going to describe how each judge works internally, since the summary doesn't give me enough to do that honestly. Read the original for the details. Be clear about the division of labor. The author's judges operate on the PDF itself: rendering, glyph geometry, ink, accessibility tags. Sentinel doesn't parse PDFs or inspect rendering, so it can't tell you a span was white-on-white. That's the author's layer, and it's a good one. Sentinel works on the text after extraction, before it reaches the model. For a pipeline like this, that means the extracted PDF text goes through /v1/scrub first. Hidden or not, an injected instruction ends up as text, and text is what Sentinel scans. Three layers are relevant: One more layer is worth knowing about: the unverifiable authorization claim heuristic . Content that asserts its own authority "you have my permission to..." sets a soft floor on the score and comes back flagged . Injected footnotes that claim to be corrections or official addenda can trip it. It's deliberately a flag and not a block, because the same phrasing is common in legitimate documents. What Sentinel can't do here: it can't see that text was hidden. If an attacker writes an injection that reads like ordinary financial prose "Restated net income was $4.2M" , there's no injection signature to match. That's a data-integrity problem, not a prompt-injection problem, and no scrub layer fixes it. The PDF-level judges and a human checking numbers against the source are the answer there. Illustrative example: extract text, scrub it, and only send the result to the model if it passes. python import httpx extracted = extract text from pdf "filing.pdf" your extractor resp = httpx.post "https://api.sentinelaifirewall.com/v1/scrub", json={"content": extracted, "tier": "strict"}, headers={"X-Sentinel-Key": "sk live ..."}, .json action = resp "security" "action taken" if action == "blocked": raise ValueError "Document withheld: injection detected" if action == "flagged": queue for human review resp "request id" safe text = resp "safe payload" send this to the LLM, not extracted An illustrative response for a document with an injected instruction block: { "request id": "a1b2c3...", "security": { "action taken": "blocked", "threat score": 0.91 }, "safe payload": " SENTINEL BLOCKED : Article withheld — fast-path prompt injection detected. Matched: \"...\"." } Note that safe payload on a block is a descriptive placeholder, not null. Branch on action taken , and log the placeholder if you like. If you're feeding many filings through, /v1/scrub/batch Teams and Enterprise takes up to 100 items per request, so you can scan at ingestion time instead of per query. Treat extracted document text as untrusted input, the same way you'd treat a web form field. If your pipeline goes PDF to extractor to LLM with nothing in between, add a scrub step between the extractor and the model today. Pair it with checks at the PDF layer like the ones in the original write-up, because they cover things a text-level scan can't see, and Sentinel covers things they can't. Neither catches plausible-looking wrong numbers, so keep a human verifying figures that matter. Sentinel has a free Starter tier 100 requests/month, no credit card : sentinelaifirewall.com https://sentinelaifirewall.com AI-assisted draft or imaging, human-curated, reviewed and edited.