What is prompt injection? A guide for AI assistant users
Prompt injection is when text that an AI assistant reads, such as a web page, an email or a document, contains instructions that the assistant follows as if they came from you. Because today's AI models can't reliably tell the difference between your request and the content they're working on, a stranger who gets text in front of your assistant can try to steer what it says or does.
For a chatbot that only answers questions, that mostly means wrong or slanted answers. For an AI agent that can read your email, browse for you or send messages on your behalf, the stakes are much higher. Here's how it works in plain terms and what you can do about it.
How prompt injection works
When you ask an assistant to "summarize this page" or "sort my inbox," it combines your request with the page or emails into one long piece of text and works through it. The UK's National Cyber Security Centre puts the core problem simply: "Current large language models (LLMs) simply do not enforce a security boundary between instructions and data inside a prompt."
So if the content contains something phrased like an instruction, the model may treat it as one. The NCSC's own example is a hiring tool that asks an AI to score CVs. A candidate hides text in their CV telling the AI to approve it, and the AI may do exactly that.
The OWASP Top 10 for LLM applications, the OWASP Gen AI Security Project's list of the biggest risks in AI apps, ranks prompt injection first in its 2026 edition. It notes that the injected text "need not be human-readable" and need not be visible on the screen. It can sit in white-on-white text, in a part of a page you never scroll to, or inside an image.
Direct and indirect prompt injection
Security researchers split it into two kinds:
- Direct prompt injection is when the person typing into the AI tries to override its rules. Jailbreaking, getting a chatbot to ignore its safety rules, is one form of this.
- Indirect prompt injection is the one that matters for everyday users. The instructions come from a third party, hidden in something your assistant reads on your behalf: a website, a shared document, a calendar invite or an email.
NIST, the US standards agency, makes the key point in its adversarial machine learning taxonomy (AI 100-2 E2025): indirect attacks are "mounted not by the primary user of a model but instead by a third party," and "in many cases, it is the primary user of the model who is harmed." In other words, you are the target, and you never see the attacker.
What can go wrong for you
The damage depends on what your assistant is allowed to do. OWASP and NIST list outcomes that translate to everyday use like this:
| What the AI can do | What a hidden instruction could try |
|---|---|
| Only chat and summarize | Give you a misleading summary, hide a warning, push a bad link |
| Read your email, files or calendar | Pull private details into its answer or into a link it creates |
| Send email, post or buy for you | Take an action you never asked for |
| Remember things between chats | Plant a false "memory" that affects later conversations |
NIST says injected instructions can "compel a model to leak information from restricted resources, such as a user's private data," and that agents can be hijacked to "exfiltrate data from the environment in which they are operating." OWASP adds that an injection written into an assistant's long-term memory can affect every later session that reads from it.
Why it can't simply be patched
Old web attacks like SQL injection were fixed by strictly separating commands from data. The NCSC argues that this fix doesn't exist for AI models, because under the hood "there's only ever 'next token'," and "it's very possible that prompt injection attacks may never be totally mitigated in the way that SQL injection attacks can be."
OWASP's 2026 entry agrees that "no reliable prevention mechanism exists today," and NIST writes that "current mitigations do not offer full protection." Researchers are working on detection, training and ways to mark content as data, which the NCSC says can make attacks harder, but its advice is to "beware any that claim they can 'stop' prompt injection."
That changes the question you should ask. Instead of "can my assistant spot a trick," ask "if my assistant got tricked, what could it actually do?"
The three-ingredient check
OWASP's 2026 guidance describes when prompt injection turns dangerous: an AI that can at the same time access private data, take in untrusted content, and communicate externally. Remove any one of the three and the worst outcomes go away.
Ask this about every assistant, plugin or agent you use:
- Does it see my private data? Email, files, contacts, passwords, payment details.
- Does it read content from strangers? Web pages, incoming email, shared documents, search results.
- Can it send, post, buy or open links on its own?
If the answer to all three is yes, that tool deserves the most caution. The NCSC gives the same advice in one line: "don't let an LLM processing emails from random external people have access to privileged tools."
How to reduce the risk
You can't fix the model, but you control what it's connected to and what it may do.
Connect less
Only link the accounts a task actually needs. If you want help drafting replies, the assistant may not need your cloud drive, your calendar and your contacts as well. Disconnect integrations you tried once and stopped using.
Give the narrowest permissions
When an app asks to connect to your email or files, read the permission screen. OWASP's example is an assistant that summarizes email: it "may only require the ability to read emails," not to send or delete them. If a tool asks for send, delete or full account access for a read-only job, say no or pick another tool.
Keep yourself in the loop
Turn on, or leave on, any setting that asks you to confirm before the assistant sends, buys, deletes or shares. OWASP's guidance is to confirm "any privileged, irreversible, or externally visible action" and to look at the exact action, not a summary of it. Read the actual email before it goes, check the real recipient, and look at the full link.
OWASP also warns about "approval fatigue." If you click Approve fifty times a day without reading, the check stops working.
Treat AI output from untrusted content as a draft
When an assistant summarizes a web page or an email from someone you don't know, treat the summary as a starting point. Be extra careful if it suddenly urges you to click a link, sign in, call a number or move money. That is the same advice as for spotting AI phishing emails, just with the AI as the messenger.
Keep secrets out of reach
Anything the assistant can see, a successful injection can try to pull out. Don't paste passwords, recovery codes or ID numbers into AI chats, and think twice before connecting accounts that hold them. Our guide on what personal information to give ChatGPT covers what to keep out.
Check memory and history
If your assistant keeps a memory of past chats, look through it now and then and delete anything you don't recognize or don't want kept.
Frequently asked questions
Is prompt injection the same as jailbreaking?
Not quite. OWASP describes jailbreaking as a form of prompt injection where the goal is to make the model break its safety rules. Indirect prompt injection is different: someone else hides instructions in content your assistant reads, and you are usually the one who gets hurt.
Can prompt injection happen through email?
Yes. OWASP lists "emails from unknown senders" as an untrusted source, and any assistant that reads your inbox reads whatever strangers send you. That is the main reason to limit what an email-connected AI is allowed to do on its own. If you want AI out of your inbox entirely, see how to stop AI from reading your emails.
Can I tell if a page or email contains a prompt injection?
Usually not. OWASP notes that injected text doesn't need to be visible or even readable to a person. Your best defenses are limiting what the AI can reach and reviewing its actions, not trying to spot hidden text.
Do AI companies protect against it?
Defenses can make attacks harder, but NIST, the NCSC and OWASP all say no current method fully prevents it. In May 2026 CISA and its international partners published guidance on careful adoption of agentic AI services, covering the security risks of AI agents and steps for running them safely.
Fewer strangers in the inbox your AI reads
Indirect prompt injection by email starts with a stranger who has your address. Giving out fewer copies of your main address shrinks that pile of untrusted mail. With Secria Mail you can give each site or service its own alias, and if one starts attracting junk you can delete it for good while the rest of your inbox stays untouched. Tracking pixels are removed automatically and senders never see your IP address. Every plan, free included, uses post-quantum encryption, and sign-up is a name, the address you want and a password, with no phone number. Create a free account.
Secria fact-checks every post against primary sources. Spotted something wrong or out of date? Email hq@secria.me and we will correct it.