Limit agent permissions to contain prompt injection
— By The Global Intelligencer
Documents and tool results can carry hostile instructions. Limit prompt injection through scoped access, validated actions, approvals, and defensive tests.
What this means
- Useful retrieved content can still contain instructions the application should not follow.
- Describe policy in prompts and enforce access and action limits in application code.
- Read-only tools and narrow credentials limit what a manipulated model can change.
- Test access, destinations, and resulting system state when evaluating an attack.
Editorial note: This is AI-assisted editorial analysis, not original news reporting. Factual claims were checked against the linked primary sources on October 17, 2026. Recommendations are analysis, hypothetical examples are labeled, and photographs are illustrative.
A relevant document can also contain instructions meant to redirect an agent. Search results, support tickets, and tool responses can all carry attempted manipulation alongside useful evidence. Permissions need to hold when the model interprets that material incorrectly. The examples here are hypothetical systems using retrieval or tools.
Keep evidence separate from authority
OWASP's prompt injection description covers direct attempts in user inputs and indirect attempts in external content. Retrieval and fine-tuning do not eliminate the vulnerability.
Consider an invoice attachment that also tells a support agent to send account records elsewhere. The invoice may help answer the customer, but its added instruction cannot authorize disclosure. Rejecting the instruction need not mean discarding the useful evidence.
The model can help distinguish the two, while an independent permission check prevents unauthorized access or transmission if it fails. This limits the scope of the failure.
Inventory consequential actions
List restricted retrieval, record creation, message delivery, settings changes, and transactions. For each, identify the necessary user authority, allowed destination, and data scope.
Reading, drafting, and executing need not use the same credentials. A system can permit a proposed action while requiring a separate check before submission. Its interface can then accurately distinguish a draft from a completed action.
Review tool combinations as well. Search, export, and messaging together can disclose information even if each looks modest in isolation. Trace the identities behind the whole sequence.
Enforce actions in software
Authenticate the user and authorize the requested resource. Model-generated arguments request an operation; the receiving service must decide whether it is allowed.
Validate schemas and business rules. Reject unsupported record types and check approved destinations. Keep secrets in the execution environment. A read-only document process should not inherit administrator writes merely because that makes setup easier. Narrow credentials do not prevent manipulation, but they reduce its possible effects.
Preserve inspectable sources
Many tasks require external material. Retain source identity and distinguish reported claims from the system's interpretation, while keeping execution policy separate.
When an action depends on evidence, show the relevant record or passage. A link to a large collection gives a reviewer less help. Clear evidence also makes incident reconstruction easier.
The source must be within the caller's access rights. Permission-aware RAG considers filtering before generation and the risks introduced by chunks and caches.
Make approvals refer to the operation
Approval belongs before execution. Show the proposed action, affected record, destination, and supporting evidence. A report-sending approval should identify the report and recipient. Changed contents or destinations may require a new decision.
Use technical controls for routine boundaries so people are not asked to approve harmless reads repeatedly. Excessive prompts make consequential approvals easier to overlook. Reserve judgment for decisions that need it.
Test effects
A model repeating suspicious text is worth investigating, but the business consequence depends on what follows. Check whether retrieval access, tool arguments, destinations, or external state changed.
Place indirect attempts in documents, snippets, and tool responses, varying format and position while preserving the legitimate task. Include ordinary-looking sources that conflict with the user or mix facts with instructions. Such testing samples plausible failures without claiming to enumerate every attack.
Observe blocked and completed operations separately from proposals. Log rejected requests without exposing the protected data. A model claiming it performed an action is insufficient evidence that it occurred.
Turn failures into regression cases
Reconstruct the request, retrieved material, proposed calls, and resulting state. The missing control may be excessive access, destination validation, caching, or unclear approval, rather than the prompt alone.
Keep the legitimate task, manipulation, intended boundary, and proof of the repair in a test case. Use synthetic or minimized sensitive content for shared tests. State the repair's limits: closing an observed route does not solve injection generally. Review privileges and monitoring as tools change.
Review the defensive boundary
- Identify consequential actions and their credentials.
- Treat returned content as evidence with no power to change policy.
- Check authority, arguments, and destinations outside the model.
- Separate read, draft, and submit where feasible.
- Bind approval to the exact operation before execution.
- Test unauthorized effects and retain regression cases.
Frequently asked questions
Can a stronger prompt prevent every injection?
Clear instructions help, but resource access and consequential actions require controls that hold when interpretation fails.
Do internal documents remove the risk?
Internal files can contain user submissions, copied content, connected-service output, or accidental conflicting instructions. Their location does not grant authority over the application.
Does a blocked call harm the user experience?
Blocking an unauthorized action is correct. Explain the boundary and provide a permitted next step or escalation.
Build the boundary early
Scoped credentials, action validation, timely approval, and observable state limit consequences directly. An agent can do useful work within those controls. Retrofitting them is harder once broad tool access has become part of everyday use.
Sources and related analysis
- OWASP Gen AI Security Project: LLM01 prompt injection.
- MCP security: an enterprise checklist for connected AI.
- Permission-aware RAG.
- AI agent observability.
The photograph is illustrative and does not document a security incident. Image supplied through Unsplash.
Tags: #ai, #ai-agents, #security, #prompt-injection