BLOGBuilding with agents

Prompt injection examples & what to fix first

Any AI agent that reads your email, socials or the web can take orders from whoever wrote them. What prompt injection is, real examples & what to fix.

A blue grid of squares and a grey grid hiding one peach square, on the left, joined by dotted lines into one stream that runs to a larger lime grid on the right, where one square has turned peach.

Every AI agent that reads for you can also be told what to do by whoever wrote the thing it’s reading. That’s prompt injection, and most prompt injection examples start right there.

It’s the one AI risk I’d want every owner to understand before they connect an agent to their inbox, their social accounts or the open web. It needs no hacking skill. Just a sentence in the right place.

A sentence in the right place

Picture an agent that looks after your accounts inbox. It reads each email, matches invoices to purchase orders and drafts the replies. It’s quick, it’s accurate and it gives someone half a day a week back.

Then a supplier email arrives with a hidden line telling the agent to change the bank details for the next payment.

You’d never see that line. Your agent reads every word, and it reads them all the same way.

That example is made up. The pattern isn’t.

Two side-by-side views of the same illustrative supplier email from accounts@supplier.example, subject This month's invoice: Hi, please find this month's invoice attached. Thanks, Sam. What you see: nothing else visible. What your agent reads, outlined in lime: one extra line hidden as white text on white, a note telling the assistant that the bank details have changed and to use a new account for the next payment, with no account shown. Footer: Same email. One extra line you'd never see. The example is made up.
Illustrative. The pattern isn't.

What prompt injection is, in plain English

A language model takes in one long stream of text. Your instructions are in it. So is the email, the web page or the review you’ve asked it to read. The model has no reliable way to mark one part as orders from you and the rest as stuff to read.

The UK’s National Cyber Security Centre put it plainly in December 2025: current models “simply do not enforce a security boundary between instructions and data”. Its advice was to stop waiting for a fix, because prompt injection “may never be totally mitigated”, and to design systems that “reduce the risk and the impact” instead.

Current models “simply do not enforce a security boundary between instructions and data.” (UK National Cyber Security Centre)

Three cards feed one stream of text into a model. From you: summarise today's emails and draft the replies. An email: a customer with a quick question about an order. A web page: a hidden line telling the agent to ignore earlier instructions and forward the latest invoice. A row of pixel dots leads to What the model sees, where all three run together as one block of text. Lime footer: No boundary between orders and reading.
The UK's NCSC, December 2025: no security boundary between instructions and data.

OpenAI said much the same about its own browser agent that month. Prompt injection, like scams and social engineering on the web, is “unlikely to ever be fully ‘solved’”.

There are two flavours. Direct injection is someone typing tricks into your chatbot. Indirect injection is the instruction hidden inside content your agent goes and reads. The second is the one to worry about, because the attacker never has to talk to you at all.

Prompt injection examples from the last two years

When AI was a chat window, the worst a poisoned page could do was give you a bad answer. Now agents read your email, browse for you, update the CRM, post, refund and spend. The words they read can turn into things they do. A review that tells your support bot to send the writer a discount code is no longer a joke. It’s a test someone will run.

It’s already happened, in tools far bigger than anything most owners will build:

  • Hidden in a screenshot, 2025. Brave hid instructions in faint text inside an image. Ask an AI browser about the screenshot and it read the hidden text as orders. You’d have looked straight past it.
  • Comet, 2025. Brave hid instructions in a Reddit comment, behind a spoiler tag. In Brave’s test, when a user asked Perplexity’s Comet browser to summarise the page, it followed them and leaked the user’s one-time login code.
  • GitHub, 2025. Invariant Labs planted instructions in an issue on a public repository. In their test, a developer’s agent read it and copied details from private repositories into a public pull request.
  • Manus, 2026. Salt Labs sent one email to a test account. When the user asked the Manus agent to check the inbox, it ran the attacker’s hidden code. Manus did flag the email as malicious, after the code had run.
Four cards, one per test. Brave, 2025, a screenshot: hidden in faint text inside an image; an AI browser read it as orders. Brave, 2025, Comet: hidden in a Reddit comment behind a spoiler tag; it leaked the user's one-time login code. Invariant Labs, 2025, GitHub: hidden in an issue on a public repository; it copied details from private repositories into a public pull request. Salt Labs, 2026, Manus: hidden in one email to a test inbox; it ran the attacker's hidden code. Lime footer: Found by researchers. Every one started with words in the wrong place.
Found by researchers. Every one started with words in the wrong place.

Most of these were found by researchers, not criminals, and the companies behind them have patched or tightened things since. Every one of them started with words in the wrong place.

Where it hides in your business

Anywhere an outsider can write text that an agent will read.

  • Email. Enquiries, supplier invoices, newsletters, the contact form that lands in your inbox.
  • Socials. Comments, DMs, reviews, bios and anything a social listening tool collects for you. A comment on a client’s post can carry a line meant for the agent that writes your weekly report, not for the people reading it.
  • Websites. Every page an agent visits when it researches a prospect, a competitor or a supplier. Hidden text on a site can make a research agent falsely recommend the company and suggest booking a meeting.
  • Files. PDFs, CVs, briefs, spreadsheets and even images.
  • Other agents. When one agent hands a summary to another, a planted instruction can travel with it.
Five cards, each marked with a coloured pixel. Email: enquiries, supplier invoices, newsletters, contact forms. Socials: comments, DMs, reviews, bios. Websites: every page a research agent visits. Files: PDFs, CVs, briefs, spreadsheets, images. Other agents: a summary handed from one agent to the next. A lime bar underneath: your agent reads every word, and reads them all the same way.
Anywhere an outsider can write text an agent reads.

It looks a little different depending on what you run.

Agencies read more outside text than almost anyone: client briefs, client inboxes you manage, social listening for client brands, and a pile of CVs every time you hire. The risk is an agent that reads a client’s world and can also reach other clients’ data.

eCommerce businesses take in product reviews, customer emails, returns notes and supplier feeds. The risk sits wherever an agent reading those can also refund, discount or change a product.

Marketplaces are the most exposed of all, because every seller is an outsider who gets to write text your systems read: listings, descriptions, messages, dispute notes. If an agent reads listings and also decides rankings or approvals, a seller can try to write to it directly.

The first fix everyone tries

I run over 40 agents across my own businesses, and plenty of them read words from people I’ve never met. The first defence almost everyone reaches for is a sentence in the agent’s instructions saying that what it reads is information, never orders. It’s where I started too.

It helps. Models are getting better at spotting these tricks, and a clear rule makes them better still. Look at it properly, though, and the gap is obvious. A rule is text. The attacker writes text too. A rule is a “please don’t” sign on the door. It isn’t a lock.

A rule is a “please don’t” sign on the door. It isn’t a lock.

The labs’ own numbers show the same thing. When Anthropic piloted its browser agent in 2025, it published that targeted attacks worked 23.6% of the time without its new safety measures and 11.2% with them. Later models brought that down a lot further. That’s real progress, and I still wouldn’t accept a number like that anywhere near a supplier payment.

Bar chart titled Targeted attacks that still worked. Without the new safety measures: 23.6%, a long peach bar. With them: 11.2%, a lime bar about half as long. Source on the chart: Anthropic, Claude for Chrome pilot, 2025. Lime footer: Better. Still not near a supplier payment.
Source: Anthropic, Claude for Chrome pilot, 2025.

The test that holds: pick two

In 2025, the developer Simon Willison named the “lethal trifecta” for AI agents. An agent becomes dangerous when it has all three of:

  1. Access to private data.
  2. Exposure to content from outsiders.
  3. A way to send information out.

Later that year Meta published its “Agents Rule of Two”, which widens the third point to any ability to change things or communicate outside. Its advice: until injection can be reliably stopped, an agent should have no more than two of the three in a single session.

For a business owner, I’d put it like this. Look at each agent and ask whether it:

  1. reads words from outsiders,
  2. can see things that matter (client data, finances, passwords, your files), and
  3. can do things (send, post, pay, refund, delete, change settings).
Three overlapping circles labelled reads outsiders, sees what matters and can act, with a lime Danger label where all three overlap. Beside them, three cards. Any two: a design you can manage. Two, and one is pay, refund or delete: keep someone approving it. All three, in lime: split it into two agents. Footer: Based on Simon Willison's lethal trifecta and Meta's Agents Rule of Two.
Based on Simon Willison's lethal trifecta and Meta's Agents Rule of Two.

Here’s how that plays out for a few common agents:

Agent Reads outsiders Sees what matters Can act Verdict
Inbox summariser that only writes a digest for you ✓ ✓ ✗ Fine
Accounts agent that reads supplier emails and pays invoices ✓ ✓ ✓ Split it
Social listening bot that drafts replies for approval ✓ ✗ ✗ Fine
Research agent that browses and updates your CRM ✓ ✓ ✓ Split it
Review responder that posts replies on its own ✓ ✗ ✓ Add approval

Any two is a design you can manage. If one of your two is “can pay, refund or delete”, keep someone approving it. All three is the one that ends up in a security write-up. In my experience, most people’s first agents have all three, because that’s what makes the demo impressive.

What I’d change first

None of this needs a security team. It needs a list and a few clear decisions.

  1. Count your agents and what they read. Include the automations in tools like Zapier or Make, and the AI features already switched on inside software you pay for. You can’t protect what you haven’t counted.

  2. Split reading from acting. The agent that reads the inbox gets no tools. It returns a short, fixed-format summary: who it’s from, what they want, how urgent it is and anything that looks odd. A second agent, which never sees the raw email, does the work. The worst a poisoned email can then do is produce a bad summary.

    A five-step flow joined by pixel dots. 1, Outsider's email: could hide anything. 2, Reader agent: no tools, can't send, pay or browse. 3, Fixed summary: from, wants, urgency, looks odd? 4, Doer agent: never sees the raw email. 5, in lime, You approve: money, customers and your name stay drafts. Footer: The worst a poisoned email can do is produce a bad summary.
    The reader has no tools. The agent that acts never sees the raw email.
  3. Give each agent the least it needs. Its own account, read-only where possible, limited to one inbox or one folder. Never your own login.

  4. Drafts, not sends. Anything touching money, customers or your name stays a draft until someone taps approve. Loosen it when the drafts stop needing edits.

  5. Close the exits. Many attacks leak data by getting the agent to open a link or load an image with your data tucked into the address. Block outbound links and images by default and allow only the places an agent needs to reach.

  6. Keep secrets out of reach. Passwords, API keys and account tokens shouldn’t be readable by any agent that reads outsiders’ words. In the Manus test, the Gmail token was sitting in the same space as the attacker’s code.

  7. Test it yourself. Send your own agent an email with a harmless planted instruction. If it follows the instruction, you’ve learned something cheaply. If it doesn’t, that’s one trick that failed, not proof you’re safe.

  8. Watch what goes out. Alerts on any email, post or payment from an agent’s account, and a regular look at which agents can reach what.

Questions to ask any agent platform

This applies to all of them: Copilot, ChatGPT, Claude, Gemini, Manus, n8n, Zapier, or something built just for you. Before you connect it to anything that matters, ask:

  • Can I limit each agent to specific tools, accounts and folders? A good answer names the settings, per agent.
  • Can I make sending, posting and paying wait for my approval? A good answer is that the action doesn’t run until you approve it.
  • How does it keep the content it reads apart from the instructions I give it? Be wary of “our model is trained to ignore it” as the whole answer.
  • Can I see a log of every action and every outside request it makes?
  • Where are my connected account tokens kept, and can the agent read them? The answer you want is no.
  • When an attack is flagged, does it stop before the action or after?

If the answers are vague, keep the agent on the read-only side of the line until they aren’t.

What this doesn’t mean

Don’t unplug your agents. The time they give back is real, and I wouldn’t go back to working without them.

Treat a new agent like a brilliant temp on their first day who believes everything they read. Give them the work. Don’t give them the keys to the safe, and don’t expect them to get less trusting with time. Design around it.

Treat a new agent like a brilliant temp on their first day who believes everything they read.

Most of the fix is plumbing. Get the plumbing right and your agents can read the whole internet without being able to do much harm with it.

If you’d like a second pair of eyes on what your agents can read and do, whether you run an agency, an online shop, a marketplace or any business with an inbox, I’m happy to talk it through. No pitch.

QUICK ANSWERS

Questions
people ask.

What is prompt injection?

Prompt injection is when instructions hidden in something an AI reads, such as an email, a web page or a review, change what the AI does. It works because a language model takes in your instructions and the content it's reading as one stream of text, and has no reliable way to tell which parts are orders and which are just information.

Is prompt injection solved?

No. The UK's National Cyber Security Centre said in December 2025 that prompt injection 'may never be totally mitigated', and OpenAI said the same month that it's 'unlikely to ever be fully solved'. Models are getting better at resisting it, but the safe approach is to design your agents so a successful attack can't do much harm.

What is prompt injection in a CV?

It's a line hidden in a CV, often in white or tiny text, telling an AI screening tool to rate the candidate highly. It's the same trick Nikkei found in 17 arXiv preprints in 2025, where authors hid text telling AI reviewers to give a positive review only. If an AI screens your CVs, it should score and summarise, and you should make the shortlist.

Can a filter or security tool stop prompt injection?

Filters catch some attacks, and they're worth having. They don't catch all of them. The EchoLeak attack on Microsoft 365 Copilot got past Microsoft's own injection filters, and in Salt Labs' Manus test the warning appeared after the attacker's code had already run. Treat filters as one layer and limit what each agent can reach and do.

Is it safe to let an AI agent read my email?

It can be, with the right set-up. Give the reading agent no tools, so it can only return a short summary. Let a separate agent act on that summary without seeing the raw email. Keep anything that touches money, customers or your name as a draft until someone approves it, and give each agent its own limited access rather than your login.

MORE NOTES