Question-led guide · risk-control
Can a system prompt stop prompt injection?
Why instruction wording cannot be the only prompt-injection control, and how to build boundaries around evidence, tools, authority, and effects.
Direct answer
No. A system prompt can express intent and help the model recognize suspicious instructions, but it is not a security boundary. An agent may still treat untrusted content as commands, disclose data through an allowed tool, or perform an excessive action. Defend the system outside the prompt: label trust zones, minimize accessible data and tools, separate reading from acting, validate structured arguments, authorize each consequential effect, require confirmation where appropriate, and test attacks continuously.
Scope
This guide applies when an agent reads content that is not fully trusted: web pages, email, tickets, documents, retrieved chunks, tool output, or messages from another agent. The risk becomes consequential when the same run can also access secrets, private data, or tools with side effects.
Why it happens
Language models process instructions and data through the same representation. Delimiters and hierarchy cues can influence behavior, but they do not transform external prose into inert bytes. An attacker can place an instruction where the agent expects evidence, or design content that manipulates a later summarization, routing, or tool-selection step.
The most dangerous architecture asks the model to both interpret untrusted content and decide whether to use broad credentials. A successful injection then crosses directly from text to authority.
Diagnosis
For each workflow, draw a path from every input to every possible effect. Mark:
- who controls the input and whether its origin is authenticated;
- which private context can be combined with that input;
- which tools are reachable and which credentials they use;
- whether arguments are free-form or validated against a narrow schema;
- where authorization is checked and whose authority it represents;
- whether a human can see the exact effect before commitment;
- how the system detects, contains, and reverses a wrong action.
If an untrusted document can influence a high-impact tool call without an independent authorization decision, the design depends on the model acting as a security boundary.
Solution
Separate the workflow into trust-aware stages. A reader extracts candidate facts from untrusted material without effectful tools. A planner proposes a typed action with evidence references. A policy component evaluates identity, tenant, resource, action, risk, and current state. A narrow executor performs only the authorized action and returns a receipt. A verifier checks the actual external state.
Minimize accessible context and credentials at each stage. Bind authorization to the user, tenant, resource, action, and time—not merely to the agent application. Treat retrieved instructions as data unless a trusted workflow definition explicitly promotes them.
Use prompts as one control: tell the model the trust labels, require it to cite the instruction source, and make it surface conflicts. Then test direct, indirect, encoded, multilingual, nested, and multi-step injections. Record not only whether the model refused, but whether sensitive data or an effect escaped.
Artifact
Use the Prompt-Injection Control Matrix during design and security review. Complete one row for every consequential action, not one row for the entire agent.
Common mistakes
- Adding “ignore malicious instructions” to the system prompt and closing the security issue.
- Giving a browsing or retrieval agent the same credentials as an effectful executor.
- Using one broad OAuth token for every user, tenant, resource, and action.
- Treating model refusal as the only security test outcome.
- Sending hidden private context to the model before it is needed.
- Asking for human confirmation without showing the exact resource, action, arguments, and consequences.
Evidence
Prompt injection can be direct or indirect and should not be treated as solved by prompt wording alone.
OWASP describes prompt injection as manipulated model behavior caused by inputs, including instructions embedded in external content.
Primary source · official-doc · checked Aug 25, 2026
Limit: The risk description and mitigations are general guidance, not a proof that a particular architecture is secure.
Excessive agency increases impact when a model has unnecessary functionality, permissions, or autonomy.
OWASP identifies excessive functionality, permissions, and autonomy as drivers of damaging actions by LLM-based systems.
Primary source · official-doc · checked Aug 25, 2026
Limit: Least privilege reduces impact but does not make model decisions trustworthy or eliminate every injection path.
Prompt-injection defenses should be reviewed as a chain of independent controls around the model.
The Signal Studio control matrix maps trust source, data access, tool authority, effect verification, monitoring, and recovery for each agent action.
Signal Studio author framework · reviewed Aug 25, 2026
Limit: This is an author-created assessment framework and is not a certification or substitute for threat modeling and security testing.
Limitations
No finite checklist guarantees immunity from prompt injection. The appropriate controls depend on reachable data, tool effects, user identity, tenant boundaries, recovery options, and the harm of a wrong action.
FAQ
- Should the system prompt still mention untrusted instructions?
- Yes. It can improve expected behavior and produce useful security signals, but it must sit inside an architecture that limits what a mistaken model decision can read or do.
- Does a content filter solve indirect prompt injection?
- No. Filters can catch known patterns, but ordinary-looking text can still redirect a task. Authorization and effect controls must not depend on detecting every malicious string.
Related guides
Continue within Agent security, or use one of these adjacent diagnostics:
English editorial review: Codex native-English editorial review, .
