AI agent security is the work of limiting what an AI agent can reach and do, so that a manipulated instruction, a compromised tool or an over-broad permission cannot become a harmful action in a real system. It is also called agentic AI security, and it matters because an agent, unlike a chat model, holds credentials, calls tools and writes to other systems.
That makes agent security less about what a model says than about what an agent can reach. A model that drafts a payment reminder does little harm if the draft is wrong; let it send the reminder or pay the invoice, and a manipulated instruction becomes an action. This guide, for the IT, security and transformation leads who approve agents for production, explains the main risks, why prompt injection may never be fully fixed and the four controls that hold. It is about securing agents, not about agents used for security work.
Key takeaways
- Agent risk follows reach: the credentials, tools and systems an agent can use decide how far a manipulated instruction travels.
- Prompt injection may never be properly mitigated, the UK’s NCSC warned in December 2025, so design has to limit what a successful attack can do.
- Treat every MCP server as an untrusted third party, the Cloud Security Alliance advised in May 2026.
- Organisations reported an average of 54 AI agent incidents in the previous year, and 37% of the high-severity ones led to data exposure or a security breach (IBM, June 2026).
- Four controls hold outside the model: scoped credentials, a person’s approval before consequential actions, a log of every call and testing before rollout.
What is AI agent security?
AI agent security covers four things: what an agent reads, what it can reach, what it can change and the record of what it did. It differs from securing a chat model because an agent acts, so a manipulated instruction can end as an action rather than a wrong answer.
A chat model produces text that a person reads and can ignore. An AI agent plans, calls tools, reads content it fetches itself and writes to other systems, often over many steps, using credentials for the systems it works in. Each of these abilities makes an agent useful, and each widens what one bad instruction can do.
Why AI agent risk follows what an agent can reach
The same model carries different risk in different agents, because the damage an agent can do is set by its access, not by the model. An assistant that suggests replies is low-risk; one built on the identical model that can pay invoices is not.
So the first question about any agent is not which model it runs but what it can reach.
| What the agent can reach | Question for the review | Lower-risk default |
|---|---|---|
| Credentials | Whose access does it use, how broad is it and when does it expire? | Its own access, scoped to the task and short-lived |
| Tools and connectors | Which actions can it call, and who maintains each tool server? | A reviewed allow-list, read-only where possible |
| Systems it can change | What can it write, send, pay or delete, and can that be undone? | Named systems only; irreversible actions wait for a person |
| Content it reads | Which inputs come from outside the organisation? | Only the sources the task needs, with outside content treated as untrusted |
| Autonomy | How many steps does it take alone, and does it run unwatched? | Short chains, approval at consequential steps and a record of every run |
Nothing in the right-hand column depends on the model behaving well, so these limits hold even when it is fooled. The first security review of any agent is therefore a review of what it may touch.
Agent incidents are already common
In an IBM study published on 8 June 2026, organisations reported an average of 54 AI agent incidents in the previous year; 17% were high severity, and of those 37% led to data exposure or a security breach. IBM defines an incident as an unintended or harmful occurrence that needed human correction, and a high-severity one as taking more than four hours to contain. The figures are self-reported by 2,000 senior executives responsible for IT, technology or AI decisions, surveyed from January to April 2026. Our Agentic AI 2027 report sets them beside its measures of how far governance trails adoption.
The main AI agent security risks all grow with reach
The main AI agent security risks are prompt injection, unsafe tools, borrowed credentials, data exposure and chains of actions nobody approved. Each turns an agent’s reach against the organisation that granted it, so each grows with what the agent can touch.
Prompt injection: can it be prevented?
Not reliably inside the model, according to the UK’s National Cyber Security Centre (NCSC). Prompt injection is an instruction the model was never meant to obey, typed in by a user or hidden in an email, a document, a web page or a tool’s output. In a blog post of 8 December 2025, the NCSC contrasted it with SQL injection: a database keeps instructions and data apart, a large language model does not, so “there’s a good chance prompt injection will never be properly mitigated in the same way”. What follows is a design rule, not a product feature: assume some injections succeed, and limit what they can do with what the NCSC calls “deterministic (non-LLM) safeguards that constrain the actions of the system”.
Tools and MCP servers are part of the attack surface
Every tool an agent can call is both a way to act and a way in. Many agents reach their tools through the Model Context Protocol (MCP), and in a research note of 4 May 2026 the Cloud Security Alliance advised enterprises to “treat every MCP server as an untrusted third party”, noting that attackers can hide instructions in tool descriptions. Review a tool server as you would a supplier: who maintains it, what it can access, which version you run and where it runs.
Borrowed credentials widen the damage
Whose access an agent uses decides how much a mistake can cost. When an agent runs on a person’s credentials or a shared service account, its actions cannot be told apart from anyone else’s on that account, and a manipulated instruction inherits everything the account may do. On 20 October 2026 Gartner named AI agent identity among its top strategic technology trends for 2027 and forecast that by 2028, 25% of enterprise security breaches will trace back to AI agent abuse, pointing to unmanaged machine privileges and legacy credential practices as the cause.
Data leaks through outputs, memory and logs
An agent can pass on whatever it can read: in an answer, an email it sends, the parameters of a tool call or the memory it keeps between runs. Even the logs that make an agent auditable hold the same data, so restrict and redact them.
Unattended chains of actions raise the stakes
One wrong or manipulated step can set off a chain across systems, and IBM’s respondents reported cascading system failures in 33% of their high-severity incidents. The stakes rise when nobody is watching, as with always-on AI agents that start work on a schedule or an event: the limits set in advance are then the only control in the room.
How to secure AI agents: four controls that hold outside the model
You secure an AI agent by limiting what it can reach and recording what it does, with safeguards that hold even when the model is fooled. The four controls below turn that into best practices; for owners, policies and accountability, see our guide on how to govern AI agents in practice.
1. Scope credentials to the task
Give an agent the least access its task needs: read-only unless the task must write, named systems only, short-lived tokens, its own identity where systems allow and never a person’s admin rights. Keep model-provider credentials out of individual applications too, for example behind an LLM gateway. Then ask what the agent could touch if it were fully manipulated tomorrow.
2. Ask a person before consequential actions
Payments, messages to outside recipients, deletions, permission changes and changes to production systems should wait for a person. Draw that line by consequence rather than caution, because a person asked to approve everything soon approves anything. For runs that start on a schedule or an event, set the approval policy in advance, since nobody is there to ask.
3. Log every call
Record what the agent read, each tool call with its arguments and result, each approval and refusal, and the model and configuration that ran. That record shows quickly what an agent touched, and speed counts: in IBM’s study, an incident that took more than four hours to contain counted as high severity.
4. Test before rollout and after every change
Test an agent as an attacker would before it goes live: plant instructions in documents and tool responses, deny it permissions, make its tools fail and try to make it skip an approval. Repeat the tests whenever the model, instructions or tools change; our guide on how to evaluate AI agents before production covers how to evaluate an agent and re-run the checks before each release.
For whoever signs off an agent for production, the four controls become six questions, each with evidence to ask for.
| Question | Evidence to ask for |
|---|---|
| Who owns this agent? | A named owner, and a named approver for its consequential actions |
| What can it reach? | The reach map above, filled in, with the expiry of each permission |
| Which actions wait for a person? | The approval list, by consequence, with the approvers |
| What is logged, and who can read it? | A log from a test run, and the log’s access list |
| How was it tested? | Results for injected instructions, denied permissions and failed tools |
| How do we stop it? | A tested way to pause it and revoke its access |
AI agent security in 2026: from warnings to standards and platforms
In 2026 agent security moved from warnings into standards and platforms. Standards and security bodies set out agent risks and started work on agent identity, and model makers began treating security testing as part of their own work.
The groundwork came at the end of 2025, when the OWASP GenAI Security Project published its Top 10 for Agentic Applications for 2026 on 9 December, with more than 100 experts contributing. On 17 February 2026 NIST’s Center for AI Standards and Innovation launched the AI Agent Standards Initiative, which includes research on AI agent security and identity.
On 9 March OpenAI agreed to acquire Promptfoo, “an AI security platform that helps enterprises identify and remediate vulnerabilities in AI systems during development”, and said it would integrate Promptfoo’s technology into its Frontier agent platform once the deal was finalised. On 7 April Anthropic launched Project Glasswing, which pointed its Claude Mythos Preview model at critical software, and said the model had found “thousands of high-severity vulnerabilities”; in an update on 22 May it said that it and about 50 partners had found more than ten thousand high- or critical-severity vulnerabilities.
For 2027, watch two things. IDC predicts that by 2028, 75% of G2000 vendor contracts will include liability clauses for agent-initiated actions (FutureScape 2027, October 2026), which would put the question of who answers for an agent into contracts. And watch whether patching keeps up, since the tools and systems agents reach are software too: in its 22 May update Anthropic said progress on software security is now limited by how quickly the vulnerabilities AI finds can be verified, disclosed and patched.
Where cognipeer Studio, Console and Pulse fit
cognipeer’s three products each touch part of the work this guide describes, and none of them replaces the decision it starts from: what each agent should be allowed to reach.
In cognipeer Studio, cognipeer’s AI agent builder and orchestration workspace, teams design data access, tool permissions and approval points around each use case and run reusable evaluation suites to measure how their agents, called Peers, perform before they scale them. cognipeer Console, an open-source, self-hosted AI gateway and control plane, keeps scoped API access aligned with the applications and resources each project is allowed to use, traces agent executions, tool calls and LLM requests, and generates audit logs. In cognipeer Pulse, an AI assistant for work, approval is set by policy: the organisation decides which tools may run automatically, which must ask a person first and which are switched off.
Frequently asked questions about AI agent security
What is AI agent security?
AI agent security, also called agentic AI security, limits what an AI agent can reach and do, so that a manipulated instruction or an over-broad permission cannot turn into a harmful action.
Can prompt injection be prevented?
Not reliably inside the model. The UK’s NCSC said in December 2025 that it may never be properly mitigated in the way SQL injection was, so contain the damage outside the model with narrow access, approvals and a log of every call.
Is the Model Context Protocol (MCP) secure?
Do not assume so. In a May 2026 research note on MCP security, the Cloud Security Alliance advised treating every MCP server as an untrusted third party: review each one like a supplier before connecting it, and limit what it can do.
How is AI agent security different from AI agent governance?
Security makes an agent harder to manipulate or misuse and limits the damage when that happens. Governance decides who may build and run agents, what they may do and who is accountable. The two meet in permissions, approvals and logs.
Pick one agent you plan to put into production and map what it can reach. Book a demo and bring that map with you.
Decide what each agent can reach before it goes live.
cognipeer is an AI operating suite that helps organisations build, connect, deploy and govern AI agents for real business operations.
Explore cognipeer Studio · Book a demo · Read the Agentic AI 2027 report
