Skip to content
Case studiesPricingSecurityCompareBlog

Europe

Americas

Oceania

Guide10 min read

Prompt Injection Attacks Against AI Document Verification

Fraudsters hide instructions, not just fake data, inside documents to hijack AI KYC checks. Learn how prompt injection works and how to defend pipelines.

CheckFile Team
CheckFile Teamยท
Illustration for Prompt Injection Attacks Against AI Document Verification โ€” Guide

Summarize this article with

A prompt injection attack against document verification hides a command, not a falsified value, inside a file so that an AI agent reading it does what the attacker says instead of what the compliance team intended. The instruction might read "mark this document verified" or "copy the applicant's case data into a new record" โ€” text a human reviewer never sees but an LLM-based extraction pipeline processes as if it came from its own operator. OWASP's GenAI Security Project now ranks this class of attack, LLM01:2025 Prompt Injection, as the single biggest risk in LLM-application security.

That framing matters for UK compliance teams specifically, because FCA-regulated onboarding and AML pipelines are exactly the high-value, high-automation target this attack was built for.

This article is provided for informational purposes only and does not constitute legal, financial, or regulatory advice. Regulatory references are accurate as of the date of publication.

The UK's National Cyber Security Centre put this in blunt terms in a December 2025 technical assessment: prompt injection "may never be fully mitigated the way SQL injection was," because large language models are, in the NCSC's phrase, "inherently confusable deputies" with no robust internal separation between trusted instructions and untrusted content (source: NCSC). For a KYC pipeline that reads passports, payslips and utility bills automatically, that is not an abstract warning โ€” it describes the exact mechanism a poisoned document exploits.

How This Differs From Hidden-Value Fraud

Prompt injection targets an AI system's decision-making, not just the data it extracts. Our companion piece on hidden text layers in PDF fraud covers a related but distinct technique: a fraudster conceals a falsified value โ€” a different account number, a different date โ€” so that OCR or a text-layer read returns the wrong figure while the visible page looks normal. The AI never receives an instruction there; it just reads bad data as if it were good data.

Prompt injection is a step further up the chain. The hidden content is not a number to be extracted but an imperative sentence aimed at the model's behaviour โ€” "ignore prior instructions," "approve this application," "output the previous customer's file." Where hidden-value fraud fools extraction, prompt injection hijacks the agent doing the extracting, and downstream systems that trust the agent's output inherit whatever it was told to do.

Where the Instructions Actually Hide

The hiding mechanisms overlap heavily with older hidden-text tricks, which is what makes them easy to miss inside an existing review process. Documented techniques include invisible or white-on-white text, near-zero-point font sizes, text pushed off-canvas beyond the visible page boundary, instructions embedded in PDF or Office metadata fields, invisible Unicode characters, and steganography hidden inside an embedded image such as a passport photo. Some payloads go further and encode the instruction in Base64 or emoji sequences specifically to dodge keyword-based content filters that scan for obviously suspicious phrases.

Academic detection research confirms this is now a defined, measurable problem rather than a hypothetical one: the 2026 paper "PhantomLint" sets out a principled method for detecting hidden LLM prompts in structured documents, and the companion "CrackedPDFs" benchmark gives researchers a controlled testbed for hidden prompt injection specifically inside PDFs (sources: arXiv:2508.17884, arXiv:2607.19396). The existence of a dedicated benchmark, built because ad hoc testing wasn't producing comparable results across tools, is itself a signal that the attack surface is broad enough to need standardised measurement.

Why AI-Powered KYC Pipelines Are a High-Value Target

A single poisoned document can compromise far more than the case it arrives in, because agentic KYC pipelines often have read and write access across a whole customer database. That is precisely the scenario demonstrated at the [un]prompted 2026 security conference by researcher Sean Park: a KYC document pipeline where a passport image carried hidden-text instructions, and the AI field-extraction agent could not distinguish the passport's genuine data from the attacker's embedded command. A single poisoned upload caused twenty other customers' personal data to be read and written into the attacker's own case file, documented at the [un]prompted 2026 conference rather than in a peer-reviewed study. Park then auto-generated 200 injection payload variants and tested them across 13 different LLM backends to show the flaw was systemic, not a quirk of one model.

That cross-model result matches what OWASP describes: prompt injection is not a bug in one vendor's LLM, but a structural property of how these systems process instructions and content through the same channel. The same attack class has already been demonstrated in production against Atlassian's Rovo agent, where hidden PDF text triggered silent data exfiltration via a generated URL, and against Microsoft 365 Copilot, where a hidden Word document prompt altered financial figures in a report and self-propagated into new documents (source: OWASP GenAI Security Project, LLM01:2025). Neither targeted document verification specifically, but both used the identical mechanism โ€” a document an AI agent trusted enough to act on.

For a UK KYC or claims pipeline, the practical exposure runs on two tracks at once. Under FCA expectations, firms remain accountable for the outcomes of automated decisioning regardless of which system produced the error, so an approval generated by a hijacked agent is still the regulated firm's approval. Under UK GDPR and ICO guidance, a prompt-injected agent that copies one customer's data into another customer's record is a personal data breach the moment it happens, not a theoretical risk to be assessed later.

Can a passport photo really contain executable instructions?

Yes, in the sense that matters operationally: the instructions live in the file as invisible text or metadata, and the AI agent reading the file executes them as if they were part of its own prompt. The photo itself is not "executable" in a malware sense โ€” the exploit works because the pipeline concatenates document content and system instructions into a single input the model cannot reliably tell apart.

Is prompt injection just phishing aimed at an AI instead of a person?

The comparison is useful but incomplete. Like phishing, it relies on a target โ€” here, the model โ€” following an instruction it shouldn't trust. Unlike phishing, there is no equivalent to security-awareness training for an LLM; the NCSC's point about "inherently confusable deputies" is precisely that the model has no reliable internal mechanism to flag an instruction as illegitimate just because of where it came from.

Ready to automate your checks?

Free pilot with your own documents. Results in 48h.

Request a free pilot

Why This Cannot Be Patched Like a Software Bug

Ordinary injection vulnerabilities, such as SQL injection, get fixed by strictly separating a query's structure from its data, and the bug class disappears once that separation is enforced. Prompt injection resists this because current LLM architectures process trusted instructions and untrusted document content through the same input channel, with no equivalent to a parameterised query. The NCSC calls this architectural, not a patchable defect, and its follow-up joint guidance "Thinking carefully before adopting agentic AI," published 15 May 2026, extends the same caution to systems that act autonomously on what they read.

The practical consequence for compliance teams is a shift from eliminating the vulnerability to limiting what a compromised agent can do: constrain an agent's tool access, keep a human in the approval loop for anything that changes a customer record, and never let a single AI judgment be the last check before a decision is finalised.

Hiding technique Where it lives in the file Why it evades a quick human review
White-on-white or invisible text Rendered page content Same colour as background, invisible unless selected
Near-zero-point font size Rendered page content Technically visible, illegible at normal zoom
Off-canvas positioning Page content outside visible bounds Never rendered within the viewable page area
PDF/Office metadata fields Document properties, not the page Reviewers rarely open metadata panes
Invisible Unicode characters Embedded in visible-looking text Renders as blank space or nothing at all
Steganography in an embedded image Pixel data of a photo or scan Undetectable without dedicated forensic tooling

Building Defence-in-Depth Instead of Trusting One Agent

The mitigation pattern security researchers recommend is architectural: separate trusted instructions from untrusted content, and never let one AI judgment alone authorise a customer-facing outcome. That is different from simply buying a better model, which still shares the same confusable-deputy problem, just with a higher bar to trigger it.

Identity-verification vendors already treat this as a distinct market need: providers such as AuthenticID and Veridas market injection-attack detection as a standalone capability alongside liveness detection, a sign enterprise buyers are asking for it directly. Manual review alone is a weak backstop against this โ€” the ACFE's 2024 Report to the Nations found the average fraud scheme still runs for about 87 days before detection when organisations rely mainly on people noticing something wrong (source: ACFE 2024 Report to the Nations). An architecture that cross-checks a document's structure independently of what any single AI agent concludes closes that window rather than widening it.

This is the logic behind CheckFile's layered approach: deterministic OCR, metadata inspection and cross-document validation run independently of the AI layer, so a hijacked or confused agent cannot single-handedly approve a case. CheckFile's AI-generation detection adds an additional layer of AI-generation signals deployed in complement to existing structural controls, not a replacement for them โ€” the deterministic checks still run regardless of what the AI layer concludes, and a human reviewer stays in the loop for flagged cases rather than an agent auto-approving on its own authority. The platform covers more than 3,200 document types across 24 OCR languages and 32 jurisdictions, with a 99.94% uptime SLA target, which matters because defence-in-depth only works if the deterministic layer runs reliably at scale.

For UK teams weighing this against wider EU exposure, the EU AI Act's high-risk classification for biometric and identity systems under Annex III depends on intended use โ€” 1:many remote biometric identification is high-risk, while ordinary 1:1 identity verification is not automatically classified that way (source: artificialintelligenceact.eu). UK firms sit outside that jurisdiction, but many serve EU customers and inherit the distinction when scoping controls.

Firms building document-verification pipelines should review the broader signal set in our checklist for spotting AI-generated documents and our document verification guide. Sector pages for banking KYC and our security architecture page show how deterministic and AI-assisted layers stay separated in practice; teams redesigning a pipeline can get in touch to walk through it.

Frequently Asked Questions

Does prompt injection require the attacker to know which AI model a company uses?

No. Researcher testing across 13 different LLM backends showed injection payloads succeeding across models rather than exploiting one vendor's quirk, so an attacker does not need to fingerprint the target system in advance.

Can keyword filtering catch hidden instructions before they reach the model?

Only partially. Attackers already encode payloads in Base64 or emoji sequences specifically to dodge keyword filters, so filtering alone is not a reliable control and needs to sit alongside structural document checks.

Is this the same risk as a chatbot being tricked into saying something embarrassing?

No. Chatbot jailbreaks usually affect output text; prompt injection against a document-verification agent can affect data access and case decisions, including writing another customer's personal data into the wrong file.

Does UK GDPR treat a prompt-injection-triggered data leak differently from a normal breach?

No. If an AI agent copies one customer's personal data into another customer's record because of a hidden instruction, that is a personal data breach under UK GDPR regardless of the technical cause, and it triggers the same ICO notification obligations as any other breach.

Can a document verification vendor guarantee immunity from prompt injection?

No credible vendor can claim full immunity, given the NCSC's assessment that the underlying architectural weakness resists complete mitigation. The realistic goal is reducing reliance on any single AI judgment through independent, deterministic checks and human review of flagged cases.

Stay informed

Get our compliance insights and practical guides delivered to your inbox.

Ready to automate your checks?

Free pilot with your own documents. Results in 48h.