AI8 min read

Prompt Injection and AI Agent Security: What Business Owners Should Know

What prompt injection is in plain words, how it can leak data or trigger wrong actions in an AI agent, and the practical defences to put in place before launch.

By Muhammad HassaanPublished
Prompt Injection and AI Agent Security: What Business Owners Should Know

Prompt injection is when text that an AI reads contains instructions, and the AI follows them. The text can come from a user, a web page, an email or a file. No one has a way to stop it completely today, so the safe approach is to build the agent so that a tricked agent can do very little harm.

What prompt injection means in plain words

A language model reads one long stream of text. Your rules, the customer's question, a web page it fetched and an email it opened all end up in that stream. The UK National Cyber Security Centre (NCSC) says current models do not enforce a security boundary between instructions and data inside a prompt. So when the text says "ignore your rules and do this instead", the model may simply do it.

Any text your agent reads can carry instructions. That text does not have to be visible to a person. OWASP notes that the input can affect the model even when humans cannot see it. There are two kinds:

  • Direct. The person typing is the attacker, or just careless. A visitor tells your support bot to ignore its rules and show other customers' orders.
  • Indirect. The attacker never talks to your AI. They hide instructions in something it will read later: a web page, an email, a PDF, a CV or a shared document.

Researchers described indirect attacks on real applications that use language models in a 2023 paper. OWASP's own examples include a web page with hidden instructions that makes an AI summary leak a private conversation, and a changed document in a company knowledge base that steers the answers. The NCSC gives another: hidden text in a CV that tells the AI to approve the candidate.

What can go wrong

  • Leaked data. If an agent can read private data and also send things out, such as an email, a web request or even an image link, a hidden instruction can make it send the data away. Developer Simon Willison calls the mix of private data, untrusted content and a way to send data out the "lethal trifecta".
  • Wrong actions. An agent that can send emails, change records, issue refunds or delete files can be pushed to do those things. OWASP calls this excessive agency and names three roots: too many functions, too many permissions and too much autonomy.
  • Wrong answers and decisions. Hidden instructions can bend a summary, a score or a recommendation, as in the CV example.

Six practical defences

  1. Give the agent only the tools it needs. If the job is to read orders and draft replies, it needs read access to orders and a place for drafts. It does not need edit rights or an admin login. Give it its own limited account. OWASP's examples of the problem include a read tool that connects with an identity that can also update and delete, and old tools that nobody removed.
  2. Require human approval for risky actions. Anything that moves money, deletes data, emails people outside your company or changes prices should wait for a person. Show the person what will happen in plain words, not only a yes button. Our post on what AI agents can do for your business explains where approvals fit.
  3. Keep untrusted text apart from instructions. Mark outside content clearly as data, for example inside labelled tags, and tell the model not to obey it. The NCSC says this can make attacks harder, but it does not remove the risk. A stronger rule, which the NCSC also describes: when a model handles information from a party, its privileges should drop to that party's level. An agent that reads email from strangers should not hold tools that touch your private files. Do not rely on a list of banned phrases such as "ignore previous instructions", because an attack can be reworded in endless ways.
  4. Check outputs before they go anywhere. Treat what the model writes as untrusted too. Use ordinary code to check the format and the allowed values, remove links and images you did not expect, and compare answers with their sources. OWASP lists improper output handling as a risk of its own.
  5. Log everything. Keep the full input and output, every tool call and every failed call. The NCSC advises this and notes that failed tool calls can show the early steps of an attack. Logs also answer the question "what did it do, and why?".
  6. Test with attack examples before launch. OWASP advises regular attack simulations that treat the model as an untrusted user. Build a list of direct tries, such as "ignore your instructions" or "print your system prompt". Add indirect tries too: a PDF with white text, an email with a hidden line, a web page with an instruction in a comment. Run the list before launch and after every change to prompts, tools, data or model.

Where to be extra careful

Product Where untrusted text comes from Extra care
Website chatbot The visitor Never let it see other customers' data. Hand account changes to a person, as in our chatbot best practices.
Assistant over company documents Documents that many people can edit or upload Limit who can add documents. Keep access rules in the search step, as in RAG over company docs.
Email or inbox agent Mail from strangers Draft only. No access to private files.
Voice agent on the phone Whatever a caller says Confirm before any action. Keep its tools few. See voice AI agents for phone calls.
Browsing or research agent Any web page Never combine private data and a way to send data out in one session.

Questions and answers

Is prompt injection the same as jailbreaking?

They are related but not the same. OWASP describes jailbreaking as a form of prompt injection where the attacker gets the model to ignore its safety rules completely. Prompt injection is wider, because it covers any input that changes how the model behaves, including hidden instructions in content that an agent reads.

Can a better system prompt fix it?

It helps a little, but it is not enough. A system prompt is only more text in the same stream, and a model can still be talked out of it. The NCSC says protection should rely more on safeguards in ordinary code that limit what the system can do, rather than on trying to keep bad text away from the model.

Do RAG or fine tuning solve it?

No. OWASP says research shows that retrieval augmented generation (RAG) and fine tuning do not fully mitigate prompt injection. A RAG assistant can even be a new way in, because anyone who can change a document it reads can try to steer it.

Is a chatbot that only answers questions safe?

It carries less risk, but not zero. It can still reveal whatever it can read, and it can still be steered into wrong answers. The risk grows with every extra data source and every tool you connect.

Do I need to worry if my team just uses an AI assistant at work?

Yes, a little. The same rule applies. Be careful when you let an assistant read untrusted content, such as web pages or emails from strangers, while it can also see private data or send things out. Check which connections and tools are switched on.

How often should we test?

Before launch, and again after any change to the prompts, the tools, the data sources or the model. Keep your list of attack examples and add to it every time you learn of a new trick.

References and further reading

If you are planning an agent that reads real data or takes real actions, we are happy to look at the design with you. See our AI agents service, or book a free 30 minute call.

ShareLinkedInXEmail
#ai#security#prompt-injection#ai-agents#owasp
Keep reading

More from the studio.

AI

Voice AI Agents for Phone Calls: How They Work and When They Fit

How a voice AI agent answers phone calls: the parts it is made of, why speed and interruptions matter, handing a call to a person, the rules, and good first uses.

Muhammad Hassaan · November 6, 2026 · 8 min read
AI

What AI Agents Can Actually Do for Your Business in 2026

AI agents are real, useful, and easy to oversell. Here is a plain English look at what they do well today, where they still need a human, and how to start.

Muhammad Hassaan · May 28, 2026 · 8 min read
AI

Chatbot, AI Agent or Automation: Which One Do You Need?

Plain definitions of a chatbot, an AI agent and automation, a comparison table, six real business situations, and how to start small without buying the wrong thing.

Muhammad Hassaan · November 6, 2026 · 7 min read
AI

Cut Your LLM Bill Without Cutting Quality

A practical, ordered playbook for lowering production LLM costs. Prompt hygiene, caching, model routing, retrieval, budgets, and the measurement that ties it all together.

Muhammad Hassaan · May 22, 2026 · 8 min read
AI

Do You Actually Need Custom AI, or Is an Off the Shelf Tool Enough?

A straight, vendor neutral answer to the question every founder is asking right now. Most teams do not need custom AI yet. Here is how to tell when you do.

Muhammad Hassaan · May 18, 2026 · 8 min read
AI

How to Build a RAG Assistant That Actually Answers From Your Company Docs

A practical guide to building an AI assistant grounded in your own handbook, policies, and support history, plus the failure modes to avoid.

Muhammad Hassaan · May 12, 2026 · 9 min read
AI

AI Development in 2026: When to Use RAG, Fine Tuning, or Just Better Prompts

A practical AI development guide. When retrieval works better than fine tuning. When prompt engineering wins. And the cost equation most teams skip.

Muhammad Hassaan · May 9, 2026 · 6 min read
AI

AI Automation for Small Business: 7 Workflows to Automate First

Seven everyday workflows a small business can automate first, how to pick yours, what a person should still check, and how to measure the time you really save.

Muhammad Hassaan · November 6, 2026 · 8 min read
Chatbots

An AI Agent on WhatsApp: Real Answers, Real Actions, Not a Button Menu

A WhatsApp AI agent reads messages in your customer's own words, answers from your own data, and takes real actions like checking an order or booking a slot, then hands off cleanly to a human.

Muhammad Hassaan · June 16, 2026 · 8 min read
Engineering

Building Neutral AI: How We Ship Production Systems Without the Hype

Hype free engineering principles for AI products that serve users, not nudge them. Grounding, refusal, evals, cost bounding, the boring decisions that actually ship.

Muhammad Hassaan · May 10, 2026 · 5 min read
Alexa

How to Get Started With Alexa Skill Development and Build Your First Skill

Most first Alexa skills die in the developer console. A practical walkthrough of skill types, interaction models, AWS Lambda hosting, and certification.

Muhammad Hassaan · August 15, 2026 · 19 min read
Alexa

If Your Radio Station Is Not an Alexa Skill, You Are Losing Listeners Every Day

Millions of homes now ask Alexa to play the radio by voice. If your station is not published as its own skill, Alexa plays nothing, plays a competitor, or plays the wrong thing.

Muhammad Hassaan · June 12, 2026 · 8 min read