AI agent security testing is an authorized assessment of an AI agent you build or deploy: it checks what the agent can reach through its identity, tools and data, whether untrusted content can steer it into misusing that reach, and whether its actions are logged. An AI security assessment also covers the model, its MCP servers and the surrounding application.
The most common weak points are in the plumbing, not the model. In IBM's 2026 Cost of a Data Breach research, more than 20% of organizations reported a breach targeting AI models or applications, and the most common causes were "weaknesses in surrounding systems": compromised APIs, applications or plug-ins (27%) and cloud misconfigurations affecting AI workloads (27%). The model is not a reliable guard either. In a large public red-teaming competition analysed by NIST's CAISI, more than 250,000 attack attempts from over 400 participants found at least one successful hijacking attack against every one of the 13 frontier models tested.
Quick answer. An AI agent security assessment tests nine things: the agent's identity and credentials, its tools and their permissions, the MCP servers and connectors it calls, the data it can retrieve, the paths by which untrusted content reaches its prompt, its memory, the actions and approvals it can trigger, its trust in other agents, and the logs that record what it did. It also tests the web application, APIs and cloud around the agent, where IBM's respondents most often found the breach. Stingrai tests AI agents, LLM applications, RAG pipelines and MCP servers in Autonomous and Hybrid engagements, quoted to scope with the retest included.
This guide is for security leaders, engineering managers and product owners who build agents on their own stack or deploy agent platforms with access to company systems. For the threat catalogue and controls, see agentic AI security; for the test-by-test checklist against the OWASP list, see the OWASP Agentic AI Top 10 coverage checklist.
TL;DR
What it is: an authorized, scoped test of an AI agent and everything it can reach, ending in findings with evidence, fixes and a retest.
Why now: more than 20% of organizations in IBM's 2026 research reported a breach targeting AI models or applications; the leading causes sat in APIs, applications, plug-ins and cloud configuration around the AI.
Why the model is not enough: in a public red-teaming competition analysed by NIST CAISI, successful hijacking attacks were found against all 13 frontier models tested, and robustness "did not correlate uniformly with model capability".
The first question: OWASP's Least-Agency principle. "Deploying agentic behavior where it is not needed expands the attack surface without adding value", so the assessment starts with what the agent can do, not what it says.
The vocabulary: the OWASP Top 10 for Agentic Applications for 2026 (ASI01 to ASI10) and the OWASP Top 10 for LLM Applications 2026 (LLM01:2026 to LLM10:2026).
When: before launch, and again whenever the agent gains a tool, an MCP server, a data source, a permission or a new model.
Why test AI agents before and after launch?
An agent turns text into actions. A chatbot that answers wrongly embarrasses you; an agent that acts wrongly sends the email, edits the record or calls the API with whatever access it was given. The OWASP Top 10 for LLM Applications 2026 calls this risk Excessive Agency (LLM03:2026) and names its root causes as "excessive functionality, excessive permissions, excessive autonomy".
Three findings from 2026 research make the case for testing rather than trusting:
The breach comes through the surroundings. IBM's 2026 report, conducted by Ponemon Institute and based on breaches experienced by 602 organizations between March 2025 and February 2026, found the most common causes of breaches targeting AI were compromised APIs, applications or plug-ins (27%) and cloud misconfigurations affecting AI workloads (27%).
Every model tested was steered. The competition NIST CAISI analysed targeted tool-use, coding and computer-use agents, found at least one successful attack against every model, and found "universal" attacks that "were often able to transfer across scenarios and models".
Upgrading the model is not a fix. The same competition found models "differed sharply in how many successful attacks were found", and that this "did not correlate uniformly with model capability". A model change is a reason to retest, not a reason to skip it.
What does an AI agent security assessment cover?
The table below is the scope Stingrai recommends for an AI agent security assessment. The framework column is Stingrai's mapping to the OWASP lists; the OWASP documents define the risks, not this scope.
Layer | What testers check | Example weakness | OWASP mapping |
|---|---|---|---|
1. Agent identity and credentials | Whose identity the agent acts with, token scope and lifetime, where secrets live | Agent runs on a shared admin service account | ASI03 Identity and Privilege Abuse |
2. Tools and permissions | Every tool, its scope, rate and egress, and whether the agent needs it | A summarizer that can also send and delete email | ASI02 Tool Misuse and Exploitation; LLM03:2026 Excessive Agency |
3. MCP servers and connectors | Authentication, token audience, scopes, tool descriptions, reach into internal systems | MCP server accepts tokens issued for another service | ASI04 Agentic Supply Chain Vulnerabilities; ASI02 |
4. Data access and retrieval | Whether retrieval enforces the user's own permissions across users and tenants | One customer's documents returned to another | LLM02:2026 Sensitive Information Disclosure; LLM09:2026 Vector and Embedding Weaknesses |
5. Prompt injection paths | Every route by which untrusted text reaches the prompt: pages, files, email, tickets, tool results | Instructions hidden in a support ticket redirect the agent | LLM01:2026 Prompt Injection; ASI01 Agent Goal Hijack |
6. Memory and context | Isolation between users and sessions, what gets written to long-term memory | Planted content persists and steers later sessions | ASI06 Memory & Context Poisoning |
7. Actions, approvals and outputs | Approval steps for high-impact actions, output handling, sandboxing of generated code | Approval prompt can be skipped or reused; output rendered unescaped | ASI09 Human-Agent Trust Exploitation; ASI05 Unexpected Code Execution (RCE); LLM10:2026 Improper Output Handling |
8. Multi-agent trust | Whether agents authenticate each other and check the sender's permissions | A low-privilege agent instructs a high-privilege one | ASI07 Insecure Inter-Agent Communication; ASI08 Cascading Failures |
9. Logging and monitoring | Whether every decision, tool call and outcome is recorded and attributable | Tool calls logged without the user or agent identity | Least-Agency observability; ASI10 Rogue Agents |
The application, APIs and cloud around the agent sit outside the nine layers but inside the scope: authentication, every user role, object-level authorization and the business logic of the workflows the agent can trigger.

Figure 1: Where an AI agent security assessment looks, and the weakness testers look for in each place. Stingrai's scope guidance, mapped to the OWASP Top 10 for Agentic Applications for 2026.
Agent identity: whose credentials does the agent use?
Every action an agent takes runs under some identity: a user's delegated token, a service account, an API key or a cloud role. The assessment establishes which, then asks three questions. Can the agent do more than the user who invoked it? Can one user's session borrow another user's access through the agent? Would anyone know which human asked for a given action? The OWASP list calls the failure ASI03, Identity and Privilege Abuse. The pattern to look for is a shared, long-lived, over-scoped credential; the usual fix is per-user delegation with short-lived, narrowly scoped tokens. For how agent identity is being standardized on the web, see Web Bot Auth and agent identity.
Tools and permissions: does the agent need everything it has?
Start with an inventory: every tool, the operations it allows, the data it reaches and the egress it permits. OWASP's guidance for ASI02 is to "define per-tool least-privilege profiles (scopes, maximum rate, and egress allowlists)", with examples such as "read-only queries for databases" and "no send/delete rights for email summarizers". The OWASP AI Agent Security Cheat Sheet puts it more simply: "Grant agents the minimum tools required for their specific task." It also says to "enforce authorization in the execution component, outside the agent's context", and to "fail closed for unknown tools or missing approval requirements". Testers then check whether the controls hold when the agent is pushed: can it call a tool outside its profile, exceed its rate, or reach a destination outside its allowlist?
MCP servers: is the connector the weak point?
Model Context Protocol servers give agents their reach into internal systems, so they get their own review. The MCP project's Security Best Practices for the current protocol version, 2026-07-28, list the attack classes an assessment should cover:
Token passthrough: "MCP servers MUST NOT accept any tokens that were not explicitly issued for the MCP server."
Confused deputy in MCP proxy servers, which can let malicious clients "obtain authorization codes without proper user consent".
Scope design: "Poor scope design increases token compromise impact", and wildcard or omnibus scopes are listed as a common mistake.
Local server compromise: local MCP servers "may have direct access to the user's system", so they should run "in a sandboxed environment with minimal default privileges".
Server-side request forgery during OAuth metadata discovery.
Testers also read every tool description the server exposes, because descriptions and responses are text the agent trusts. For a full MCP scope, see the MCP server security assessment guide.
Data access: does retrieval respect the user's permissions?
Agents that search documents, tickets or a vector store often query with the agent's own access rather than the asking user's. The test is simple to describe: sign in as two users, or two tenants, and check whether either can get the agent to return the other's data. The OWASP LLM 2026 list covers the failure under LLM02:2026 Sensitive Information Disclosure and LLM09:2026 Vector and Embedding Weaknesses. The cheat sheet adds a design rule worth testing against: "Minimize sensitive data in agent context."
Prompt injection paths: where does untrusted text enter?
Prompt injection is LLM01:2026 in the OWASP list, and for agents it becomes ASI01, Agent Goal Hijack: instructions planted in content the agent reads change what it does. An assessment does not try to prove a model can never be fooled; in the competition NIST CAISI analysed, every one of the 13 models tested was. It maps every path by which untrusted text reaches the prompt (web pages, uploaded files, inbound email, support tickets, code comments, tool and MCP responses) and tests the highest-risk combinations: untrusted input on one side, a powerful tool on the other. The finding that matters is not "the model followed a planted instruction" but "a planted instruction caused a harmful action that no control stopped". The cheat sheet's baseline is to "treat all external data as untrusted".
Memory: can one session poison the next?
Agents with long-term memory or shared context can carry planted content forward. Testers check isolation ("implement memory isolation between users/sessions", in the cheat sheet's words), what the agent is allowed to write to memory, and whether stored content is validated and expires. OWASP lists the risk as ASI06, Memory & Context Poisoning.
Actions and approvals: what happens before the agent does something irreversible?
The cheat sheet's rule is to "require explicit approval for high-impact or irreversible actions", with each approval tied to the current actor and the exact tool call, and "short-lived authorization artifacts and replay protection for irreversible operations". Testers look for approval steps that can be skipped, replayed or worded so that a person approves something other than what runs. OWASP's ASI09, Human-Agent Trust Exploitation, covers the human side of the same failure. Output handling belongs here too: agent output rendered in a browser, passed to a shell or sent to an API needs the same validation as any other untrusted input (LLM10:2026, Improper Output Handling), and generated code needs a sandbox (ASI05).
Multi-agent trust: does one agent believe another without checking?
Systems of planners, workers and reviewers pass instructions between agents. The cheat sheet says to "implement trust boundaries between agents", to "authenticate communicating agents and enforce the sender's permissions", and to "apply circuit breakers to prevent cascading failures". Testers check whether a low-privilege agent can direct a high-privilege one (ASI07) and whether one agent's failure spreads (ASI08).
Logging: could you reconstruct what the agent did?
OWASP's Agentic Top 10 calls strong observability "non-negotiable", and the cheat sheet asks teams to "log all agent decisions, tool calls, and outcomes". The assessment checks the logs against the test itself: after testers run a scenario, can your team find it, attribute each tool call to a user and an agent identity, and see the arguments and results? Platforms differ widely in what they record; our AI agent audit logging matrix compares what the major platforms actually record.
AI security assessment vs AI red teaming vs AI penetration test vs automated evaluation
Buyers meet five names for overlapping work. The table is Stingrai's summary of how they differ; no standard defines the boundaries.
AI security assessment | AI penetration test | AI red teaming | Automated evaluation or scanning | AI risk or governance assessment | |
|---|---|---|---|---|---|
Question it answers | Is this agent's design, configuration and reach safe, and what is exploitable? | What can an attacker make this AI system do, with proof? | Can a realistic adversary reach an objective across people, process and technology? | How often does the model fail a fixed set of test prompts? | Are AI risks identified, owned and governed? |
Method | Architecture and permission review plus targeted adversarial testing | Hands-on exploitation of the AI application, agent, tools and APIs | Objective-driven, multi-step campaigns, often over weeks | Large prompt suites run by tooling, scored automatically | Interviews, documentation review, mapping to a framework |
Output | Findings across design, configuration and exploitable flaws, with fixes and a retest | Proven findings with evidence, severity, fixes and a retest | Narrative of the campaign and the controls that did or did not stop it | Pass and fail rates per test category | A risk register and control gaps |
Typical anchor | OWASP Agentic Top 10; OWASP AI Agent Security Cheat Sheet | OWASP LLM Top 10 2026; OWASP Agentic Top 10 | MITRE ATLAS scenarios | Benchmark and evaluation suites | NIST AI RMF 1.0; NIST AI 600-1 |
Best for | Before launch and after major change | Proving exploitability for customers and auditors | Mature programs testing detection and response | Regression checks between releases | Governance, procurement and board reporting |
In practice the first two are often bought as one engagement; Stingrai's AI and LLM penetration testing covers tool permissions and scopes, MCP credentials and the IAM roles around the AI stack alongside the exploitation work. For providers of the third, see best AI red teaming companies; for how autonomous agents and penetration testers combine, see AI penetration testing explained. NIST's AI Risk Management Framework, released on 26 January 2023 and intended for voluntary use, and its Generative AI Profile, NIST AI 600-1 (26 July 2024), frame the governance side; MITRE ATLAS is "a public knowledge base of adversary TTPs targeting AI systems" used to plan red team scenarios. The OWASP AI Testing Guide, released as v1 on 26 November 2025, describes itself as "a practical standard for trustworthiness testing of AI systems".
How is an AI agent security assessment run?
The steps below are Stingrai's summary of a well-run assessment.
Map the system. Collect the architecture, the model and platform, every tool and MCP server, every data source, every identity the agent uses and every channel through which content reaches it.
Review agency. For each tool and permission, ask whether the agent needs it, and whether its scope, rate and egress are limited. This is where OWASP's Least-Agency principle turns into findings.
Review configuration. Check identity and token handling, MCP server authentication and scopes, retrieval permissions, memory settings and the cloud roles around the AI stack.
Test injection paths against the riskiest tools. Plant controlled test content in each untrusted channel and see whether it can drive a high-impact tool. Testing stays inside agreed rules of engagement on a test tenant or with test data.
Test authorization across users and tenants. Use at least two accounts per role and check the agent never returns or acts on data the asking user cannot reach.
Test approvals, outputs and code execution. Try to skip or replay approvals, and check how agent output is rendered and executed.
Check the logs. Confirm your team can find and attribute what the testers did.
Report, fix and retest. Each finding comes with evidence, impact and a fix; the retest confirms the fix holds.
What should you hand the testers?
Preparation decides how much of the budget goes on testing rather than discovery. This list is Stingrai's guidance:
an architecture diagram and the list of tools and MCP servers, with the scopes each holds;
test accounts for at least two users per role, and for two tenants if the product is multi-tenant;
access to a staging or test environment with realistic, non-production data;
the system prompt and agent configuration, or read access to them;
the approval rules for high-impact actions;
read access to the agent's logs, or a named person who can pull them during testing;
a contact who can pause the agent if a test has side effects.
For a ready-made scope document, see the AI and LLM pentest scope of work template; for what moves the price, see AI and LLM pentest cost drivers.
What should an AI security assessment report contain?
scope, dates, the agent version, model and tool list tested;
each finding with the path that produced it (input, agent decision, tool call, effect), evidence, severity and the fix;
a mapping of findings to the OWASP Agentic Top 10 and LLM Top 10 IDs, so they line up with your risk register;
the least-agency review: tools and permissions the agent does not need;
the logging gaps found while checking attribution;
retest results for every fixed finding;
an attestation letter stating scope and testing dates, for customers and auditors.
When should an AI agent be retested?
An agent changes every time its reach changes. Retest when the agent gains a tool, an MCP server, a data source or a permission; when the model or platform changes, because NIST CAISI found robustness "did not correlate uniformly with model capability"; when approval rules change; and at least once a year. Our AI and LLM retest trigger matrix sets out which changes need a full retest and which need a targeted one.
Where an agent is reached through a web application and its APIs, that application is part of the attack surface: compromised APIs, applications or plug-ins were one of the two most common causes of the AI breaches in IBM's research. For that layer, Stingrai's Hybrid Pentest covers one web application and associated APIs: Snipe, Stingrai's autonomous AI agent, tests the full application while Stingrai's certified penetration testers test the same application manually alongside it and validate Snipe's findings, so coverage is wider and deeper. It is US$6,800 per assessment one-time, or US$1,275 a month continuous on a 12-month plan, with monthly Snipe testing, human-verified, and a quarterly deep dive by Stingrai's penetration testers. Continuous testing suits applications that ship changes between annual tests. Testing of the agent itself, its tools, MCP servers and data sources is quoted to scope as an AI and LLM engagement. See pricing or Get a Quote.
Where Stingrai fits
Stingrai is a CREST-accredited penetration testing company founded in Toronto in 2021. Its CREST Marketplace listing shows two accreditations, Penetration Testing and AI-Enabled Penetration Testing, and the CREST AI Charter company certification.
Stingrai's AI and LLM penetration testing covers the layers in this guide:
AI agents and tool integrations: tool misuse and excessive agency, agent goal hijack through planted instructions, approval step and human-in-the-loop bypass, and memory and context poisoning across sessions.
MCP servers: authentication and authorization on MCP endpoints, tool permissions, scopes and over-broad credentials, tool description and response manipulation, and reach from MCP tools into internal systems and data.
RAG pipelines: cross-user and cross-tenant data access through retrieval, and access control on vector databases.
AI infrastructure: Amazon Bedrock, Azure OpenAI and Azure AI services, Google Vertex AI, model gateways, and the IAM roles and network paths around the AI stack.
The application around the model: authentication, every user role, object and function-level authorization, and the business logic of the workflows the AI can trigger.
Engagements run two ways. In an Autonomous engagement, Snipe's specialist sub-agent for AI and LLM applications, including MCP servers, tests on its own. In a Hybrid engagement, two named penetration testers from a team holding OSCE³, OSWE, OSEP, CREST CRT and CISSP certifications test alongside it. AI red team exercises are human-led. Testing is aligned with the OWASP Top 10 for LLM Applications 2026, the OWASP Top 10 for Agentic Applications for 2026, MITRE ATLAS and NIST AI 600-1. Findings are posted to the PTaaS portal, the deliverables include an executive summary and a full technical report, the retest is included, and every engagement comes with an attestation letter stating scope and testing dates. AI and LLM engagements are quoted to scope through Get a Quote, with pricing within 24 hours.
Frequently Asked Questions
What is AI agent security testing?
AI agent security testing is an authorized assessment of an AI agent you build or deploy. It checks what the agent can reach through its identity, tools, MCP servers and data, whether untrusted content can steer it into misusing that reach, whether approvals hold before high-impact actions, and whether its actions are logged and attributable.
What does an AI security assessment cover?
A complete AI security assessment covers nine layers: agent identity and credentials, tools and permissions, MCP servers and connectors, data access and retrieval, prompt injection paths, memory and context, actions, approvals and outputs, multi-agent trust, and logging. It also covers the web application, APIs and cloud configuration around the agent.
Why do AI agents need security testing if the model has guardrails?
Guardrails reduce risk but do not remove it. In a large public red-teaming competition analysed by NIST CAISI, with more than 250,000 attack attempts, at least one successful hijacking attack was found against all 13 frontier models tested. Testing checks what happens after the model is fooled: whether permissions, approvals and logging stop the harm.
How is an AI security assessment different from AI red teaming?
An AI security assessment reviews the agent's design, configuration and reach and tests the riskiest paths, ending in fixable findings and a retest. AI red teaming runs objective-driven campaigns, often over weeks, to see whether a realistic adversary reaches a goal and whether detection and response work. Many programs do the assessment first.
How do you test an AI agent for prompt injection safely?
Testers map every channel through which untrusted text reaches the agent, such as web pages, files, email, tickets and tool results, then plant controlled test content in a test tenant or with test data and check whether it can drive a high-impact tool. The finding that matters is a harmful action no control stopped.
What should be tested on an MCP server?
Authentication and authorization on MCP endpoints, whether the server accepts tokens not issued to it, the scopes it grants, its tool descriptions and responses, and how far its tools reach into internal systems. The MCP Security Best Practices also cover confused deputy attacks in proxy servers, server-side request forgery and sandboxing of local servers.
How often should AI agents be security tested?
Before launch, at least once a year, and whenever the agent gains a tool, an MCP server, a data source or a permission, or changes model or platform. NIST CAISI found that robustness did not correlate uniformly with model capability, so a model upgrade is a reason to retest.
Which frameworks does an AI agent security assessment use?
Most assessments map findings to the OWASP Top 10 for Agentic Applications for 2026 (ASI01 to ASI10) and the OWASP Top 10 for LLM Applications 2026, use the OWASP AI Agent Security Cheat Sheet for controls, plan adversary scenarios with MITRE ATLAS, and report governance gaps against the NIST AI RMF and NIST AI 600-1.
Does Stingrai test AI agents and MCP servers?
Yes. Stingrai tests AI agents, LLM applications, RAG pipelines and MCP servers, either with Snipe's AI and LLM sub-agent alone in an Autonomous engagement or alongside two named penetration testers in a Hybrid engagement. Engagements are quoted to scope, the retest is included, and every engagement comes with an attestation letter.
Related reading
Agentic AI security (2026): threats, controls and how to test an agent
MCP server security assessment: do the AI agents touching your internal tools need one?
What your AI agent platform actually logs: an audit evidence matrix
Penetration testing providers that combine AI agents with penetration testers (2026)
References
IBM. Cost of a Data Breach Report 2026 (press release, conducted by Ponemon Institute). 29 July 2026. https://newsroom.ibm.com/2026-07-29-ibm-study-one-in-four-malicious-breaches-are-ai-enabled,-costing-companies-6-million-on-average. 602 organizations, breaches March 2025 to February 2026.
NIST Center for AI Standards and Innovation (CAISI), now the Center for Advancing Innovation and Standards for Super Intelligence (CAISSI). Insights into AI Agent Security from a Large-Scale Red-Teaming Competition. 23 March 2026. https://www.nist.gov/blogs/caissi-research-blog/insights-ai-agent-security-large-scale-red-teaming-competition. More than 250,000 attack attempts against 13 frontier models. Public competition hosted by a third party; CAISI co-analysed the data with the UK AI Security Institute and frontier AI labs.
OWASP GenAI Security Project. OWASP Top 10 for Agentic Applications for 2026. 9 December 2025. https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/. ASI01 to ASI10 and the Least-Agency principle.
OWASP GenAI Security Project. OWASP Top 10 for LLM Applications 2026. 3 August 2026. https://genai.owasp.org/resource/owasp-genai-llm-top-10-2026/. LLM01:2026 to LLM10:2026.
OWASP Cheat Sheet Series. AI Agent Security Cheat Sheet. https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html. Controls for tools, input, memory, approvals, outputs, monitoring, multi-agent trust and data.
Model Context Protocol. Security Best Practices, protocol version 2026-07-28. https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices. Token passthrough, confused deputy, SSRF, local server compromise and scope minimization.
OWASP. AI Testing Guide v1. 26 November 2025. https://owasp.org/www-project-ai-testing-guide/. Methodology for trustworthiness testing of AI systems.
NIST. AI Risk Management Framework 1.0 (26 January 2023) and NIST AI 600-1, Generative AI Profile (26 July 2024). https://www.nist.gov/itl/ai-risk-management-framework. Voluntary governance framework.
MITRE. ATLAS (Adversarial Threat Landscape for AI Systems). https://atlas.mitre.org/. Knowledge base of adversary tactics and techniques against AI systems.
Talk to Stingrai
Tell us what your agent can reach: its tools, MCP servers, data sources and the identities it acts with. Get a Quote for pricing within 24 hours, or book a free discovery call.


