Prompt injection
Prompt injection is an attack in which text given to a language model, typed by a user or hidden in a document, web page or record it reads, changes the model's behaviour in ways nobody intended. It is first on OWASP's 2025 list of risks for LLM applications, and in a business app the defence that holds is that the model can never act alone: in Meadowstack, a change an assistant proposes does nothing until a person says yes.
By Bohuslav PoláčekChecked
const needs = [
"A server route that speaks MCP, deployed with the app's backend.",
"Keys an admin makes here, each read only or read and write, shown once and revocable.",
"Tools that call the app's api as the person who made the key, never with more rights.",
"A log of every call: who asked, what for, and whether a person said yes.",
];
const rules = [
"An assistant never gets more rights than the person who connected it.",
"Every change it asks for waits for a person's yes in the app.",
"Every call is written to the log.",Why it matters in a business app
OWASP distinguishes direct injection, where a user's own prompt changes the model's behaviour, from indirect injection, where the model reads outside content (a supplier's e-mail, an uploaded PDF, a comment on a record) that carries instructions. The second is the business app's problem: anyone who can write a comment can write to the assistant.
No filter catches every phrasing, so the damage has to be limited by design. OWASP's mitigations include least-privilege access for the model, human approval for high-risk actions, and keeping external content separate and marked.
How Meadowstack handles it
What 2.1 ships is the interface and the rules; the model and its server are yours:
- The assistant proposes, a person decides. The kit's AssistantPanel shows a change as a proposal card with Yes and No; the recipe
docs/recipes/notifications-and-assistant.mdmakes the yes a second request by the person, checked again withcan(). The demo's assistant is a script, not a model. - The model acts as the person. Reading tools return only what the person may see; writing tools store a proposal and do not write. An assistant never gets more rights than the person who connected it (least privilege).
- The browser never calls the model, and the model's key is a server secret.
- Every call is logged, so an odd request can be traced.
- Untrusted text stays text. The kit's
Markdownrenders to elements, never to HTML, and does not load images, so a model's answer cannot smuggle markup into the page.
The same rules apply to the MCP server your app would offer.
Common mistakes
- A write tool that writes. The model's yes is not a person's yes.
- A service account behind the model. One injected instruction then reads every client's records.
- Trusting a system prompt to hold. It narrows behaviour; it does not enforce anything.
- Rendering the model's output as HTML. An injected link or image can carry data out of the page.
A proposal, not an action
Questions
Can prompt injection be fully prevented?
No known filter stops every phrasing. Limit what a successful injection can do: the model acts with the person's rights, writes wait for a person's yes, and every call is logged.
What is indirect prompt injection?
Instructions hidden in content the model reads, such as a web page, a file or a record, rather than typed by the user. In a business app any text field another person can fill is a possible source.
Does Meadowstack include a language model?
No. 2.1 ships the assistant's interface, the proposal card and the rules; the demo's assistant is a script. You connect a model behind your own backend, following the recipe.
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app