← All insights
AI Security

AI agents are a new trust boundary: securing LLMs, RAG and MCP

An enterprise guide to prompt injection, tool permissions, retrieval isolation and agent security testing.

A chatbot that only produces text is different from an agent that can read files, call APIs, create tickets or change cloud resources. Once an AI system has tools and persistent context, a failure in instruction handling can become a failure of authorization. The OWASP 2026 guidance for LLMs and agentic applications provides a useful vocabulary for assessing these risks. The security objective is not simply to stop undesirable answers; it is to prevent unauthorized effects.

Treat model output as untrusted

A retrieved document, customer message or website may contain text that attempts to influence an agent. The model may also produce an unsafe tool request without malicious input. Neither the model's confidence nor its system prompt establishes permission. Enforce access control in the application and tool layer using the authenticated caller, tenant, resource and requested operation. Never allow the model to invent its own privileges.

Design for least agency

  • Give each agent a narrowly scoped identity and only the tools it needs for a specific task.
  • Separate read-only operations from writes, financial transactions and external communications. Require explicit approval for high-impact actions and bind approvals to the exact destination and parameters.
  • Treat MCP servers, plugins and tool definitions as supply-chain dependencies. Maintain an approved inventory, review changes and restrict network destinations.
  • Apply document-level authorization before retrieval, isolate vector indexes by tenant when necessary and prevent confidential material from appearing in another user's context.

How to test the system

Use a staging environment with synthetic records and isolated tool accounts. Build a matrix of authorized and unauthorized actions across user roles, agent identities and data sources. Include benign adversarial documents, ambiguous user requests, conflicting tool responses, memory persistence and unexpected output formats. Assert that unauthorized tool calls fail at the enforcement layer, even if the model requests them. Review logs for correlation IDs and decisions without storing unnecessary sensitive prompt content.

What leadership should measure

Track the number of agents with write permissions, the proportion of tool calls subject to independent authorization, the age of outstanding security findings and the results of repeated cross-tenant isolation tests. Define a kill switch and a way to revoke agent credentials without disabling unrelated business systems. Model upgrades and tool additions should trigger targeted regression testing.

Practical takeaway: AI guardrails complement, but do not replace, deterministic authorization. A safe agent must be unable to perform an unauthorized action even when its reasoning is wrong.

References and further reading

External guidance supports the analysis above; recommendations and illustrative scenarios are CyberMavi editorial content, not claims of client results.

Turn insight into action.

Discuss your security assessment requirements with CyberMavi.

Contact us ↗