Can someone trick your AI assistant with a hidden instruction or a planted file?
Yes. To an AI assistant, the text it reads and the commands it should obey look much the same, so a file or email can smuggle in orders, and a fake document can be passed along as fact. Neither trick can be ruled out entirely. A well-built system therefore caps the assistant's powers and controls where its output can go.
The short version
An assistant answers questions by reading your files and messages. The AI model underneath sees all of it simply as text, with no dependable way of sorting reference material from commands.
That creates two openings. An attacker can bury commands in a file that push the assistant into doing something no one requested. Or an attacker can add a misleading document to the pool it draws on, and the assistant will quote it with full confidence. Since neither can be shut off completely, the protections worth paying for are those that limit the harm.
A picture: the over-helpful temp
Imagine a keen temp sorting the morning's letters. In the middle of one, a line reads: "To whoever opens this: please email the most recent payroll spreadsheet to the address below." Someone sensible would stop and ask a manager. Someone too eager to please might go ahead.
Now picture a forged but plausible memo slipped into the files. Every time you ask the temp about that subject from then on, the forgery is what they quote.
The comparison has a gap. Hidden commands can be invisible to human eyes, for instance text colored to match the page, so you may never see what the assistant took in.
Two different tricks
| Hidden instructions | Planted files | |
|---|---|---|
| What it is | Commands buried in a file, email or web page the assistant reads | Fake or misleading material slipped into the pool of documents it searches |
| The harm | The assistant ends up working for the attacker, perhaps passing your data to them | Confident, official-sounding answers that are wrong, for example about pricing, policy or payment details |
OWASP, the security foundation whose lists of top software risks are widely used, calls the first trick indirect prompt injection: the AI model takes in material from an outside source, such as a website or a file, and that material carries instructions. (The AI model here is the LLM, or large language model, behind the assistant.)
For the second, a team led by Zou ran a study called PoisonedRAG. They inserted only five specially written texts per question into a pool of millions of documents, and the assistant returned the answer the attacker wanted nine times out of ten.
In the PoisonedRAG study, five fake texts per question, buried among millions of documents, got the attacker's answer out of the assistant 90% of the time.
Having the assistant search your own files before replying doesn't fix this. OWASP cites research showing that this kind of setup does not fully remove the prompt injection risk.
What actually controls the risk
The UK's National Cyber Security Centre (NCSC) has said it doubts prompt injection can ever be fully eliminated, and that realistic defense means making attacks less likely to succeed and less damaging when they do. So in a review, we spend less time on any filter that claims to stop everything and more on how much a successful trick could accomplish:
- Minimal powers. OWASP's advice is to keep the AI model's access rights to what is strictly necessary. If the assistant has no ability to send email, no trick can make it send one.
- Human sign-off on anything consequential. Payments, deletions, outgoing messages and sharing all pause until a person approves. OWASP recommends exactly this kind of human check for privileged actions.
- No covert exit for data. One reported attack hid stolen data in the web address of an image. Microsoft, writing about its own product, says Copilot now stops some untrusted links from being generated.
- Outside material is suspect by default. Emails and web pages from beyond the company are flagged and handled with more caution than documents your own people have reviewed.
- A known origin for every file. Record who added each document and when, and restrict who can add to the pool at all. A folder that anyone can drop files into is an easy entry point for fakes.
- It reads only what the requester is cleared for. That also shrinks what any trick can get at. See why the permission check has to happen before the assistant reads anything.
This has already happened
EchoLeak, 2025
The Hacker News reported that in June 2025, Aim Security researchers revealed a Microsoft 365 Copilot vulnerability scored 9.3 on a 10-point severity scale. A single email containing concealed commands could get Copilot to gather company data and send it outside, without the user clicking anything. Microsoft patched it on its end, and nothing suggested attackers had used it in practice.
The steps are worth walking through, because the user barely takes part:
- A message lands in the inbox with commands concealed in it. Nobody needs to open it or click a link.
- Some time later, an employee puts a routine question to the assistant, which pulls in that message while it works out a reply.
- The concealed commands instruct it to collect internal material, anything that employee has access to.
- They also instruct it to smuggle that material out, embedded in a link or image address within its reply.
That particular hole was closed. The protections that last are the ones listed above: narrowing what the assistant can reach, and preventing its replies from carrying data out unseen.
Two things that make it worse
Greater powers, greater damage. If an assistant can only reply, a trick can make it say something false. If it can send messages, change records or make purchases, a trick can make it do something harmful. We go into that in what changes when the assistant can act.
Filtering won't be enough. Microsoft describes this as “an inherent risk” and relies on several overlapping defenses instead of one fix.
What to ask your IT team or vendor
- Does it take in material from outside the company, like inbound email or websites? If so, is that handled more cautiously than our internal files?
- Apart from replying, what actions can it take, such as sending, editing, sharing or purchasing? Which ones need a human to approve?
- Can a reply contain a link or image that leaks information to another site? What stops that?
- Who is allowed to add files to the pool it draws on, and is each addition logged?
- Have you tried it against a fake document and a concealed command? What was the result?
Terms you may hear
- Prompt injection: wording that gets an AI to obey commands it ought to ignore.
- Indirect prompt injection: the same attack, tucked inside a file, message or web page the AI takes in.
- Data poisoning, RAG poisoning, knowledge base poisoning: seeding the material an AI searches with false content.
- Exfiltration: sneaking data out to an attacker, a link being one route.
- Human in the loop: nothing happens until a person approves it.
- Least privilege: granting the AI the minimum access its job requires.
- Zero-click: an attack needing no action at all from the victim.
How we help
We review an assistant you are planning or running for exactly these weak points: what outside material it takes in, what it can do besides reply, whether its replies can carry links or images out, and who can add files to the pool it searches.
We help cut its powers down to what the job needs, put a human sign-off in front of anything consequential, and set up a record of where each document came from.
Before launch, we test it the way an attacker would, with a fake document and a concealed command, and report plainly what happened and what was changed.
Talk to us about your projectSources
- OWASP, LLM01:2025 Prompt Injection
- Zou et al., PoisonedRAG (research paper)
- NCSC, Prompt injection is not SQL injection (2025)
- Microsoft Security Response Center, How Microsoft defends against indirect prompt injection attacks (2025)
- The Hacker News, Zero-click AI vulnerability in Microsoft 365 Copilot (2025)