Skip to main content

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).

Where an agent attack travelsFour steps: untrusted content such as a web page, file or tool description reaches the model; the model is steered; it calls a tool with the agent's own access; the action happens unless something outside the model stops it.1InputPage, file,email or tooldescription2SteerThe model readsit asinstructions3ActIt calls a toolwith the agent’saccess4Stop?Controls outsidethe model arethe dependablestop
A test follows this chain end to end and records where it could have been stopped.

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.
Four areas an agent test coversTools and permissions, the identity the agent uses, the inputs it trusts, and the human approvals around risky actions.ToolsWhat each canread, write,deleteIdentityWhosecredentials, forhow longInputsPages, files,email, tooldescriptionsApprovalWhich actionsask a person
Each area is tested on its own and as part of the chain above.

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).

IDTitle
ASI01Agent Goal Hijack
ASI02Tool Misuse
ASI03Identity & Privilege Abuse
ASI04Agentic Supply Chain Vulnerabilities
ASI05Unexpected Code Execution
ASI06Memory & Context Poisoning
ASI07Insecure Inter-Agent Communication
ASI08Cascading Failures
ASI09Human-Agent Trust Exploitation
ASI10Rogue 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.

Three ways an MCP server adds riskIts tool descriptions are read by the model; a local server is a program that runs with your privileges; a remote server may not ask anyone to sign in.DescriptionsRead by the model,not always by youLocal serversPrograms that runwith your privilegesRemote serversSign-in is achoice
The MCP config checker looks at all three in a pasted config.

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.

CVEProductPublishedScore (supplied by)
CVE-2025-6514mcp-remote2025-07-09
9.6 Critical (CVSS 3.1) (CNA)
CVE-2025-49596MCP Inspector (before 0.14.1)2025-06-13
9.4 Critical (CVSS 4.0) (CNA)
CVE-2025-53109Filesystem server, Model Context Protocol Servers2025-07-02
7.3 High (CVSS 4.0) (CNA)
CVE-2025-53110Filesystem server, Model Context Protocol Servers2025-07-02
7.3 High (CVSS 4.0) (CNA)
CVE-2025-68143mcp-server-git, Model Context Protocol Servers2025-12-17
8.8 High (CVSS 3.1) (NVD)
6.5 Medium (CVSS 4.0) (CNA)
CVE-2025-68144mcp-server-git, Model Context Protocol Servers2025-12-17
7.1 High (CVSS 3.1) (NVD)
6.3 Medium (CVSS 4.0) (CNA)
CVE-2025-68145mcp-server-git, Model Context Protocol Servers2025-12-17
9.1 Critical (CVSS 3.1) (NVD)
6.4 Medium (CVSS 4.0) (CNA)
CVE-2025-54136Cursor (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

What an agent test leaves you withA map of what the agent can reach, proof of what an injected instruction can do, findings mapped to OWASP, and a retest.1MapWhat it canreach, tool bytool2ProofWhat an injectedinstruction cando3FindingsTied to OWASPIDs4RetestAfter thefixes
Ask for all four in the quote.
  • 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

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