What Is Prompt Injection? 7 Real Attacks on AI Agents Explained
What is prompt injection? A plain-English guide to how hidden text hijacks an AI agent, 7 documented attacks from 2024 and 2025, and 9 defences you can use.

Prompt injection is when text an AI reads, in an email, a web page or a document, is taken as an instruction and changes what the AI does. The UK's National Cyber Security Centre said in December 2025 that these attacks "may never be totally mitigated", and every major vendor agrees the problem is unsolved. This guide explains it in plain English, shows 7 documented attacks and gives 9 defences a small business can apply today.
You ask your AI assistant to summarise this morning's email. One message, from an address you do not know, contains a line you never see: white text on a white background telling the assistant to find your latest invoices and send them somewhere else. The assistant cannot tell that line from your request. Both are just words. That is prompt injection, and it matters more each month, because the tools have moved from answering questions to doing things: reading the inbox, opening files, clicking buttons in a browser. The government's Cyber Security Breaches Survey, published in April 2026, found 31% of UK businesses using, adopting or considering AI, and only 24% of those had any process for managing its security risks.
Below: how we checked this guide, the idea in plain English, 7 real attacks in a table, where hidden instructions hide, why agents raise the stakes, what the vendors themselves admit, 9 defences, settings worth changing and how to keep using an agent safely.
An agent you can watch is easier to trust. On Jobbit you can see the agent's browser as it works and take control at any point, and Plan mode shows the steps before anything runs. Free plan, 100 credits a day, no card.
How we checked this guide
- Primary sources, read on 13 November 2026. OWASP's risk list for AI applications, the National Cyber Security Centre, the United States standards body NIST, the Information Commissioner's Office, and security posts from Microsoft, Google and Anthropic.
- Each attack traced to the researchers who disclosed it. Where the original write-up would not load, the table says so.
- Defence only. This guide describes how attacks work at the level official sources publish. It contains no working attack text.
- Vendor quotes are the vendors' own words, from their security blogs and research pages, not from marketing.
- No claim that any product is immune, including ours.
Prompt injection in plain English
OWASP, the body behind the best-known list of software security risks, puts prompt injection first on its list for AI applications and defines it this way: a vulnerability that "occurs when user prompts alter the LLM's behavior or output in unintended ways". It splits the problem in two.
- Direct prompt injection. The person typing is the attacker. They try to talk the AI out of its rules. This is mostly the vendor's problem.
- Indirect prompt injection. The instruction arrives inside something the AI was asked to read. OWASP describes it as input "from external sources, such as websites or files". The person using the AI is the victim. This is your problem.
The root cause is simple to state. NIST explains that these models "combine the data and instruction channels". A normal program keeps the commands and the content apart. A language model receives one long stream of text and decides for itself which parts matter.
The name dates from 12 September 2022, when the developer Simon Willison wrote: "I propose that the obvious name for this should be prompt injection." It echoes an older attack on databases, and the National Cyber Security Centre warns against taking the comparison too far. Database injection has a known fix. For language models the centre suggests thinking of an "inherently confusable deputy": a helper with your access that can be talked into working for someone else.
7 real attacks at a glance
| When disclosed | Product | Where the instruction hid | What an attacker could do | What changed |
|---|---|---|---|---|
| August 2024 | Slack AI | A message in a public channel | Get a private secret shown to the victim as a link to click | Slack called the behaviour intended, per the researchers |
| May 2025 | An agent connected to GitHub | An issue in a public code repository | Pull private repository data into a public place | No patch; narrower permissions advised |
| June 2025 | Microsoft 365 Copilot | An email, needing no click | Disclose information over a network | Fixed by Microsoft, tracked as CVE-2025-32711 |
| August 2025 | Google Gemini | The title of a calendar invite | Delete events, send messages, control smart-home devices | Google added confirmations and filtering |
| August 2025 | ChatGPT with connected files | Tiny white text in a shared document | Search a connected drive for keys and leak them | OpenAI added a check the researchers said was not enough |
| August 2025 | Perplexity's Comet browser | A hidden comment on a web page | Read a one-time code from email and take over an account | Patched, then reported as not fully fixed |
| September 2025 | Salesforce Agentforce | The description box on a web form | Send customer records to an outside address | Salesforce enforced a trusted address list |
The researchers were, in order, PromptArmor, Invariant Labs, the team credited on the Microsoft vulnerability record, SafeBreach, Zenity Labs, Brave and Noma Labs. The Microsoft 365 Copilot case is described from the public vulnerability record and an academic paper, because the original write-up would not load for us.
Three things stand out. Every product is from a large, careful company. None of the victims had to do anything unusual: they asked for a summary, accepted an invite or received an email. And several fixes were described by the researchers as partial.
Where the hidden instructions hide
Each of these comes from one of the disclosures above or from an official source.
- Web pages. White text on a white background, comments in the page code, text behind a spoiler tag.
- Emails. Invisible text in the body. Anthropic's safety page warns that "a to-do list or email might contain invisible text".
- Calendar invites. In the event title, out of sight until expanded.
- Shared documents. One-pixel white text in a file you were sent to review.
- Web forms. A "tell us about your enquiry" box that feeds your customer system.
- Chat channels and code repositories. Anywhere a stranger can post and your assistant can read.
- Images. OWASP lists an instruction embedded in a picture that accompanies harmless text.
- Tool descriptions. The Information Commissioner's Office calls this "tool poisoning, where this is hidden within the metadata of tools that an AI agent interacts with".
The pattern is that anything your AI reads on your behalf is a way in, and you will not see the text yourself.
Why agents raise the stakes
A chatbot that is fooled gives a bad answer. An agent that is fooled takes a bad action. Simon Willison named the dangerous combination in June 2025: "access to your private data", "exposure to untrusted content" and "the ability to externally communicate". He called it the lethal trifecta. An assistant with all three can be told by a stranger to find something private and send it out.
Look back at the table. Every attack had all three. The summary feature could read private messages, it read a stranger's message, and it could show a link. Take away any one of the three and the attack fails.
The National Cyber Security Centre's May 2026 paper on agentic AI makes the same point for organisations: "If an agent is over-privileged or poorly designed, a single failure can quickly become a serious incident." Our explainer on computer-use agents covers what these tools can now do.
What the vendors themselves admit
This is not a problem the industry hides.
- Anthropic, in research published in November 2025, called prompt injection "far from a solved problem" and wrote that "no browser agent is immune to prompt injection". It published its own numbers: against a persistent automated attacker, its best model was fooled 1.4% of the time with safeguards on, and it said that even 1% "still represents meaningful risk".
- OpenAI's chief information security officer described it in October 2025 as "a frontier, unsolved security problem".
- Microsoft's security response team wrote in July 2025 that its approach "does not rely on our ability to block all prompt injections". A Microsoft security post in May 2026 put it more bluntly: "your LLM is not a security boundary."
- Google described a layered defence in June 2025: classifiers, link filtering and asking the user to confirm risky actions.
- The National Cyber Security Centre advises scepticism towards any vendor claiming to stop it.
When the makers say the lock can be picked, plan on the assumption that one day it will be.
9 defences a small business can use today
- Give the agent the least access that does the job. The National Cyber Security Centre says to give agents "only the minimum access they need, for the shortest time required". An assistant drafting replies does not need to send them.
- Break the trifecta. Do not let one assistant read private data, read strangers' content and send things out, all in the same task. Summarise the inbox in one session; send from another, yourself.
- Keep a person in the loop for anything that matters. OWASP recommends human review "for high-risk or privileged actions". Payments, deletions, anything sent to a customer.
- Treat what the AI reads as untrusted. A web page, an attachment and an email from an unknown sender are all content, never commands.
- Treat what the AI writes as untrusted too. Do not click a link in an AI summary to "re-authenticate". That was the Slack attack.
- Use a separate browser profile for agent work. Anthropic's own safety advice is a profile with no banking, health or government accounts signed in.
- Watch it work. If the task drifts, such as a summary that turns into a search of your files, stop it. Logs of what the agent read and did are worth keeping.
- Start with low-risk jobs. The centre's advice is to "start small, use agents only for low-risk tasks". Research and drafting before invoices and email.
- Write it into your AI policy. Who may connect which tool to which account, and who can switch it off. Our AI policy template has the wording.
None of these needs a security team. They are the same habits as not opening an attachment from a stranger, applied to a new kind of helper.
Settings worth changing
- Approval mode. Anthropic's help pages say Claude in Chrome can be set to "Manually approve" so you review every action, and that you can grant or remove its access to specific sites.
- Signed-out browsing. OpenAI's security chief described a logged-out mode for its Atlas browser agent, where the agent works without your accounts. Use it for research on sites you do not know.
- Connectors. Each file store, mailbox and calendar you connect widens what an injected instruction can reach. Connect what the task needs, then disconnect.
- Automatic approval. Any "always allow" option trades safety for speed. One of the 2025 disclosures noted that it hides exactly the step you would want to see.
How to keep using an agent safely
None of this is a reason to stop. It is a reason to choose supervised tools and sensible jobs. ChatGPT, Claude, Gemini, Microsoft Copilot, Manus and Meta's Muse all face the same problem, and so does Jobbit. What you can choose is how much you can see and stop.
- Watch and take over. A Jobbit agent's browser is visible while it works, and you can take control at any point. Our guide to the agent browser shows how.
- Plan before it acts. Plan mode sets out the steps for approval before anything runs, as explained in our guide to steering an agent.
- Start with work that has no trifecta. Building a website, writing a document, researching a market and making a spreadsheet involve little private data and nothing sent on your behalf.
- Keep secrets out of the chat. Projects include a dedicated place for secrets, so keys and passwords do not need to be pasted into a conversation.
- Hand the risky part to a person. A vetted professional from the human network can do the step that needs judgement, with payment held in escrow.
The honest position is the one the vendors take: no agent is immune. Supervision and limited access are what keep a fooled agent from becoming an incident.
The UK picture
The Information Commissioner's Office published five steps in May 2026 for protecting an organisation from AI-powered threats: know what you are up against, get the basics right and layer your defences, restrict access points, improve detection and response, and protect personal data. It describes indirect prompt injection as malicious instructions "embedded in external content that an AI system processes".
The scale of ordinary risk is in the Cyber Security Breaches Survey 2025/2026: 43% of UK businesses reported a breach or attack in the previous twelve months, from a sample of 2,112 businesses. Prompt injection is one new route among many old ones. Our guide to AI scams aimed at small businesses covers the others.
Read next
Frequently asked questions
What is prompt injection in simple terms?
It is when words inside something an AI reads are treated as an instruction. The AI cannot reliably tell your request from text in an email, web page or file, so a hidden line can change what it does. OWASP ranks it as the first risk on its list for AI applications.
What is the difference between direct and indirect prompt injection?
Direct injection is typed by the person using the AI, to make it break its rules. Indirect injection is planted in content the AI is asked to read, such as a web page or document, and targets the person using it. Indirect injection is the one that threatens a business.
What happens if an AI agent summarises an email with hidden instructions?
It may follow them. In documented cases from 2024 and 2025, assistants asked for a summary went on to search private files, reveal secrets or send data out. Whether it succeeds depends on the product's safeguards and on what the agent has access to, which is why limited access matters.
Can prompt injection be fixed?
Not completely, on current evidence. The National Cyber Security Centre says these attacks may never be totally mitigated, and Anthropic, OpenAI and Microsoft have all said the problem is unsolved. Safeguards lower the success rate. Limiting what the agent can reach limits the damage.
Is prompt injection the same as jailbreaking?
They overlap. Jailbreaking usually means a user persuading the AI to ignore its safety rules. Prompt injection covers any input that changes the AI's behaviour in unintended ways, including text planted by a third party. A jailbreak is a kind of direct prompt injection.
How do I protect my business from prompt injection?
Give AI tools the least access they need, keep a person approving payments and outgoing messages, never let one assistant read private data, read strangers' content and send things out in the same task, and use a separate browser profile for agent work. Write the rules into an AI policy.
Is it safe to use an AI agent at all?
Yes, with supervision and the right jobs. Start with work that involves little private data, such as research, drafting and building a website, and use a tool that lets you see and stop what it does. On Jobbit you can watch the agent work and take control, and the free plan gives 100 credits a day with no card.