AI agent security testing
An agent is an AI system that can act: call tools, read files, browse, run code. Testing one is about what it can reach and what can steer it. Here is what to scope, what the OWASP lists name, and the public flaws in the MCP tools around agents.
Why agents need their own test
A chatbot that only answers can only say wrong things. An agent can do wrong things, with the access you gave it. The NCSC puts the problem this way: “it’s very possible that prompt injection attacks may never be totally mitigated in the way that SQL injection attacks can be.” (NCSC) It adds: “we instead need to approach it by seeking to reduce the risk and the impact.” (NCSC)
So the question for a test is not only whether the model can be fooled. It is what happens next: which tools it can call, with whose identity, on what data, and who is asked before anything irreversible. The NCSC’s blog post says: “Design protections need to therefore focus more on deterministic (non-LLM) safeguards that constrain the actions of the system” (NCSC).
What to put in scope
- Tools and permissions: every tool the agent can call, and what each can read, write or delete.
- Identity: whose credentials the agent uses, how long they last and what else they open.
- Inputs it trusts: web pages, documents, email, retrieved data, other agents, tool descriptions.
- Memory and context: what it stores between runs, and who can write to it.
- MCP servers and plugins: where each came from, how it is started, what it can reach, whether remote ones need sign-in.
- Human approval: which actions ask a person, and whether the prompt shows what will really happen.
- Code execution: anything that runs commands or code, and where.
Give the tester test accounts, the tool list and the configs. Our guide to what to send for a quote covers the basics.
The OWASP Top 10 for Agentic Applications
The IDs give you and your tester a shared name for each risk. OWASP describes it as a peer-reviewed framework of the most critical security risks facing autonomous and agentic AI systems. The item titles below are as listed in OWASP’s launch post for the 2026 edition (December 2025).
| ID | Title |
|---|---|
| ASI01 | Agent Goal Hijack |
| ASI02 | Tool Misuse |
| ASI03 | Identity & Privilege Abuse |
| ASI04 | Agentic Supply Chain Vulnerabilities |
| ASI05 | Unexpected Code Execution |
| ASI06 | Memory & Context Poisoning |
| ASI07 | Insecure Inter-Agent Communication |
| ASI08 | Cascading Failures |
| ASI09 | Human-Agent Trust Exploitation |
| ASI10 | Rogue Agents |
Ask your tester which published version of the list they map to.
MCP: the newest part of the surface
The Model Context Protocol lets an assistant connect to servers that offer tools. Three things make it a testing target.
Tool descriptions are read by the model. Invariant Labs defines tool poisoning like this: “A Tool Poisoning Attack occurs when malicious instructions are embedded within MCP tool descriptions that are invisible to users but visible to AI models.” (Invariant Labs) The MCP specification says descriptions of tool behaviour, such as annotations, should be considered untrusted unless they come from a trusted server.
Local servers are programs you run. The specification’s security guidance lists an attacker putting a malicious startup command in a client configuration as an attack on local servers, and tells clients to warn that servers run with the same privileges as the client.
Authorization is optional. The specification says so. A remote server that asks nobody to sign in may answer whoever finds its address.
Paste a config into the MCP config checker for a first look. It runs in your browser and is a pattern check, not a test.
OWASP MCP Top 10
OWASP’s page presents the MCP Top 10 as a beta: its roadmap says Phase 3, beta release and pilot testing, is the current phase. Titles may change before the final release.
- MCP01:2025 Token Mismanagement & Secret Exposure
- MCP02:2025 Privilege Escalation via Scope Creep
- MCP03:2025 Tool Poisoning
- MCP04:2025 Software Supply Chain Attacks & Dependency Tampering
- MCP05:2025 Command Injection & Execution
- MCP06:2025 Prompt Injection via Contextual Payloads
- MCP07:2025 Insufficient Authentication & Authorization
- MCP08:2025 Lack of Audit and Telemetry
- MCP09:2025 Shadow MCP Servers
- MCP10:2025 Context Injection & Over-Sharing
Both lists sit alongside OWASP’s list for LLM applications. In its 2025 edition, items that apply to agents include LLM01:2025 Prompt Injection, LLM06:2025 Excessive Agency, LLM07:2025 System Prompt Leakage. OWASP’s site also lists an OWASP GenAI LLM Top 10 2026, dated August 3, 2026, so ask which edition a tester or customer means.
Public flaws in MCP tools
These CVEs are in MCP reference servers, a debugging tool, a connection helper and a code editor, as NVD describes them. They show what testers find: command injection, missing authentication on a local developer tool, files outside the allowed folder, and a trusted config swapped for a malicious one. Scores are shown as NVD lists them, with who supplied each: NVD’s own score, or the score from the CVE’s numbering authority (CNA). Some records have only the CNA’s.
| CVE | Product | Published | Score (supplied by) |
|---|---|---|---|
| CVE-2025-6514 | mcp-remote | 2025-07-09 | 9.6 Critical (CVSS 3.1) (CNA) |
| CVE-2025-49596 | MCP Inspector (before 0.14.1) | 2025-06-13 | 9.4 Critical (CVSS 4.0) (CNA) |
| CVE-2025-53109 | Filesystem server, Model Context Protocol Servers | 2025-07-02 | 7.3 High (CVSS 4.0) (CNA) |
| CVE-2025-53110 | Filesystem server, Model Context Protocol Servers | 2025-07-02 | 7.3 High (CVSS 4.0) (CNA) |
| CVE-2025-68143 | mcp-server-git, Model Context Protocol Servers | 2025-12-17 | 8.8 High (CVSS 3.1) (NVD) 6.5 Medium (CVSS 4.0) (CNA) |
| CVE-2025-68144 | mcp-server-git, Model Context Protocol Servers | 2025-12-17 | 7.1 High (CVSS 3.1) (NVD) 6.3 Medium (CVSS 4.0) (CNA) |
| CVE-2025-68145 | mcp-server-git, Model Context Protocol Servers | 2025-12-17 | 9.1 Critical (CVSS 3.1) (NVD) 6.4 Medium (CVSS 4.0) (CNA) |
| CVE-2025-54136 | Cursor (1.2.4 and below) | 2025-08-02 | 8.8 High (CVSS 3.1) (NVD) 7.2 High (CVSS 3.1) (CNA) |
Read the NVD record for each before you rely on it: scores and affected versions can change.
What a good test gives you
- A map of what the agent can reach, tool by tool, and what it should reach.
- Proof of what an injected instruction can do, with the steps to repeat it.
- Findings tied to the OWASP IDs your customer or auditor uses.
- Fixes that limit impact (narrower permissions, approvals, separate identities) rather than only a longer prompt.
- A retest after the fixes.
Sources
- OWASP GenAI Security Project: OWASP Top 10 for Agentic Applications for 2026
- OWASP: OWASP MCP Top 10
- OWASP GenAI Security Project: OWASP Top 10 for LLM Applications 2025
- NCSC: Prompt injection is not SQL injection (it may be worse)
- Model Context Protocol: Specification: security best practices and authorization
- Invariant Labs: MCP security notification: tool poisoning attacks
- NIST: National Vulnerability Database
Frequently asked
What is an AI agent, for a security test?
An AI system that can act: it calls tools or APIs, reads files or web pages, and sometimes runs for a while without a person approving each step. The more it can reach, the more a test has to cover.
Can prompt injection be fixed?
The NCSC says it is very possible that prompt injection attacks may never be totally mitigated in the way that SQL injection attacks can be, and advises approaching it by reducing the risk and the impact. A test shows what an injected instruction could reach.
Does an MCP server need a login?
The MCP specification makes authorization optional, and says HTTP-based transports should follow its authorization spec. Whether your server needs a login is your decision, and a test should check that it behaves as you intended.
Is this the same as AI red teaming?
They overlap. A security test of an agent tries to break its access controls and tools. Red teaming is a wider word. See the comparison page.
Compare UK penetration testing companies
Filter firms by service and accreditation, then contact the ones you like.
Browse the directory