AI agent security testing is no longer optional. In 2025, AI agent CVEs rose 255% year-over-year, from 74 to 263 documented vulnerabilities. The Gravitee State of AI Agent Security 2026 report, surveying over 900 practitioners, found that 88% of organizations experienced confirmed or suspected AI agent security incidents in the past year, and over 50% of deployed agents operate with no security oversight or logging at all.
If you are running agents in production, this guide covers what testing actually looks like, what attack vectors are unique to agentic systems, which tools exist, and how to structure an assessment that gives you real confidence.
Key Takeaways
- AI agents create attack surfaces that don't exist in traditional LLM deployments: tool abuse, inter-agent communication, memory poisoning, and privilege inheritance all require agent-specific testing methods
- The OWASP Top 10 for Agentic Applications (2026) and MITRE ATLAS v5.4.0 provide the most comprehensive current taxonomy of agent risks
- CVE-2025-32711 (Microsoft 365 Copilot EchoLeak, CVSS 9.3) and CVE-2025-34291 (Langflow RCE, CVSS 9.4) demonstrate that these vulnerabilities are being exploited in production
- Research finds 94.4% of state-of-the-art agents are vulnerable to prompt injection; 100% are vulnerable to inter-agent trust exploits
- Effective testing requires scoping agent architectures like you would scope an application penetration test: enumerate trust boundaries, tool permissions, and data flows before testing begins
- Open-source tools like Promptfoo, Garak, and AgentDojo make automated baseline coverage achievable for most teams
- Only 14.4% of organizations have full security approval for their entire agent fleet, creating significant enterprise exposure
Why AI Agent Security Testing Differs from LLM Testing
Testing a customer-facing chatbot and testing an AI agent are fundamentally different problems.
A chatbot that produces a harmful text response is an unpleasant outcome. An agent that is hijacked produces file deletions, unauthorized wire transfers, email exfiltration, or lateral movement across internal systems. The attack surface expands in three dimensions that don't exist in single-turn LLM interactions.
Actions are real and often irreversible. An agent with access to a file system, database, or external API can cause damage that persists after the attack completes. A financial institution documented a case in 2024 where hidden instructions in an email caused an AI assistant to approve $2.3 million in fraudulent wire transfers. The conversation log showed nothing unusual to a human reviewer.
State persists across sessions. Agents maintain memory, either in vector databases, conversation history, or external stores. An attacker who poisons that memory in one session can influence the agent's behavior for months. Traditional LLM red teaming has no equivalent; each conversation is stateless.
Trust flows between agents. Multi-agent architectures introduce lateral movement paths that don't exist in single-model deployments. Research from COLM 2025 found that the Magentic-One orchestrator using GPT-4o executes arbitrary malicious code 97% of the time when it interacts with a crafted local file. The agent doesn't know the file is malicious because it cannot distinguish data from instructions.
The OWASP Agentic Top 10: What to Test For
The OWASP Top 10 for Agentic Applications, published in December 2025 with over 100 contributors, is the most authoritative current taxonomy of agent-specific risks. Testing an agent without this framework as a baseline is testing without a threat model.
ASI01: Agent Goal Hijacking. Malicious instructions embedded in the data an agent processes, such as emails, PDFs, webpages, or RAG documents, redirect its objective. This is indirect prompt injection applied to agentic context, but the consequences are categorically different because the agent acts rather than responds. CVE-2025-32711 (EchoLeak) is the canonical production example: a crafted email caused Microsoft 365 Copilot to silently exfiltrate enterprise data across Word, PowerPoint, Outlook, and Teams with no user interaction, bypassing Microsoft's XPIA classifier. CVSS score: 9.3.
ASI02: Tool Misuse and Exploitation. Palo Alto Unit 42 documented nine specific exploitation scenarios: agent enumeration via prompt injection, system prompt extraction, tool schema disclosure, SSRF through web-reader tools, credential theft via code interpreters, SQL injection through unvalidated tool inputs, authorization bypass (BOLA), indirect injection via poisoned webpages, and multi-agent communication poisoning. Every agent with more than two tools should be tested for all nine.
ASI03: Identity and Privilege Abuse. Agents typically inherit service account credentials scoped for broad access, because the teams building them think in terms of what the agent needs to do, not what it should never be able to do. Testing should enumerate all credentials accessible to the agent at runtime and map privilege escalation paths. Research from Gravitee found 45.6% of organizations rely on shared API keys for agent-to-agent authentication.
ASI04: Agentic Supply Chain Vulnerabilities. MCP servers, plugins, and agent templates are fetched and executed at runtime in most current deployments, with no code review equivalent to what software teams apply to third-party libraries. MITRE ATLAS v5.4.0 added specific techniques for this in February 2026: "Publish Poisoned AI Agent Tool" and "Escape to Host." Testing should include MCP server trust evaluation, plugin integrity verification, and dependency provenance.
ASI05: Unexpected Code Execution. Agents that generate or execute code in unsandboxed environments create direct RCE pathways. CVE-2025-34291 in Langflow is the most significant production example: a CORS misconfiguration combined with CSRF bypass and code evaluation yielded full account takeover and remote code execution. CVSS 9.4. The Flodric botnet deployed through compromised Langflow instances, with active exploitation confirmed on January 23, 2026.
ASI06: Memory and Context Poisoning. Long-term memory stores are persistent attack surfaces with no equivalent in traditional LLM testing. Research documented in arXiv:2510.23883 found 83.3% of agents are vulnerable to retrieval-based backdoors. A single poisoning interaction can alter agent behavior across all future sessions until the memory store is explicitly audited and remediated.
ASI07: Insecure Inter-Agent Communication. Agent-to-agent messages in most frameworks are authenticated by position in the conversation, not by cryptographic identity. An attacker who can inject a message into the agent communication channel can impersonate any agent in the mesh. In the AutoGen and CrewAI comparative analysis published in arXiv:2512.14860 (130 test cases), AutoGen refused 52.3% of adversarial requests versus CrewAI's 30.8%, demonstrating that the framework choice itself creates significant security variance.
How to Structure an AI Agent Security Assessment
The most common mistake is treating agent security testing as an unstructured red-teaming exercise. Effective testing mirrors how traditional application penetration tests are scoped and delivered.
Phase 1: Architecture Mapping. Before any testing begins, enumerate the complete attack surface. Document every tool the agent has access to, every external service it can call, every data source it reads from (including memory stores and RAG indexes), every downstream agent it orchestrates, and all credentials available to it at runtime. Map trust boundaries: what data enters the agent from untrusted sources, and what actions does it take that could be exploited if that data is malicious?
In practice, this phase surfaces issues that direct testing misses. We have seen agents with production database write access that the development team did not realize was in scope because the ORM abstracted the connection string.
Phase 2: Passive Reconnaissance. Before active exploitation, test for information disclosure: can the system prompt be extracted? Can tool schemas be enumerated? Can agent identity be spoofed? These are low-noise, high-value techniques that establish what an attacker knows before mounting a targeted attack.
Phase 3: Active Exploitation Testing. Test each OWASP Agentic Top 10 risk against the agent's actual architecture. Use a combination of automated tooling for broad coverage and manual testing for chained exploitation. NIST's AgentDojo research found that attack success rates rise from 11% on a single attempt to 80% with 25 attempts, which means automated tooling with retry logic is essential for realistic coverage.
Phase 4: Multi-Agent Communication Testing. If the agent orchestrates other agents or is orchestrated by an external system, test the communication layer for spoofing, injection, and privilege escalation. This phase requires a test environment that mirrors the production agent mesh, not just the target agent in isolation.
Phase 5: Supply Chain Assessment. Inventory every MCP server, plugin, and external agent template. Verify integrity of each dependency. Test what happens when a dependency changes unexpectedly. 25.5% of deployed agents can autonomously create and task other agents, per Gravitee 2026, which means the supply chain is dynamic at runtime.
Testing Tools: What to Use
Several open-source tools provide automated coverage for agentic risk categories.
Promptfoo is the most comprehensive option for teams that need CI/CD integration. Acquired by OpenAI in March 2026 and used by over 25% of Fortune 500 companies, it supports full LLM system testing including RAG pipelines and agent architectures. Configuration is YAML-based, making it practical for security teams without deep ML background.
AgentDojo, developed by ETH Zurich and validated by NIST, is purpose-built for agent hijacking evaluation. It is the tool behind the NIST AgentDojo blog findings that documented the gap between baseline attack success rates (11%) and red-teamed success rates (81%). Use this for focused agent goal hijacking coverage.
Garak, from NVIDIA, provides the widest probe library for LLM vulnerability scanning, covering over 100 vulnerability classes drawn from academic research. It handles the LLM layer effectively and is a good complement to agent-specific tools.
PyRIT, from Microsoft, is Python-native and integrates well with Microsoft-stack AI applications including Azure OpenAI and Copilot deployments.
DeepTeam, from Confident AI, covers 40+ vulnerability classes with 10+ adversarial attack strategies and explicitly aligns to the OWASP Agentic Top 10 framework, making it particularly useful for compliance-oriented assessments.
Automated tooling covers breadth, but manual testing is essential for chained exploits and architecture-specific attacks that don't fit generic probe libraries. A well-structured assessment uses automated tools for baseline coverage and reserves specialist time for the high-impact scenarios that require understanding the specific agent's data flows and tool permissions.
Common Misconfigurations Found in Production Agents
Based on the documented CVEs and research findings, the most common exploitable misconfigurations in production are:
Over-privileged tool credentials. An agent that needs read access to a database often has read/write access because that was easier to configure. Test by enumerating what write or delete operations the agent can execute, even if its stated purpose doesn't require them.
Unvalidated tool inputs. Tool inputs from agent reasoning are often passed directly to downstream systems without the sanitization that developers apply to user-supplied inputs. SQL injection through an agent's database query tool, SSRF through a web-fetch tool, and command injection through a shell tool are all documented attack paths that are frequently untested.
Unsandboxed code execution. Agents that can run code, whether for data analysis, automation, or testing, are high-risk if that code runs on the host or with access to production credentials. CVE-2025-34291 is the production demonstration of what happens when this is not isolated.
No memory store access controls. Vector databases and conversation history stores are frequently configured with the same credentials as the agent runtime, meaning an attacker with agent-level access can read, modify, or poison the entire memory store. Test memory store isolation as a separate attack surface.
Trust inheritance in multi-agent architectures. Orchestrator agents often implicitly trust messages from subagents without verifying identity. Test by injecting messages into the communication channel between orchestrator and subagent to verify that claimed permissions are validated.
Regulatory and Compliance Context
The regulatory environment for AI agent security is moving quickly.
The NIST AI Agent Standards Initiative (CAISI), announced February 17, 2026, identifies prompt injection and accountability gaps in autonomous action chains as the two most urgent vulnerabilities requiring standard-setting. Organizations that hold SOC 2 Type II, ISO 27001, or HIPAA certifications are increasingly being asked by auditors how AI agents are covered in their security assessment programs.
The EU AI Act classifies high-risk AI systems, and agentic systems used in hiring, credit, healthcare, or critical infrastructure fall squarely in that category. Article 9 requires ongoing conformity assessments and incident logging. A security testing program that covers OWASP Agentic Top 10 provides defensible documentation for these requirements.
For organizations in financial services, the DORA regulation's ICT risk management requirements apply to AI agents that connect to trading systems, payment processing, or customer data. Regular adversarial testing is not a recommendation; it is a control requirement.
Detailed guidance on how AI agents interact with compliance frameworks is available on the BeyondScale compliance resources page.
Starting Your AI Agent Security Testing Program
The IBM 2025 Cost of Data Breach Report found that 13% of organizations reported breaches of AI models or applications, with 97% of those organizations lacking proper AI access controls. The average cost of a shadow AI breach: $4.63 million. A structured testing program that covers the OWASP Agentic Top 10 and includes architecture review, automated scanning, and manual exploitation is a direct risk reduction investment with measurable ROI.
Start with an inventory of your deployed agents: what tools they have, what data they access, what credentials they hold, and what actions they can take. That inventory is the foundation of every subsequent testing decision. Agents without an inventory cannot be meaningfully tested.
The BeyondScale AI Security Assessment covers agent architecture review, OWASP Agentic Top 10 testing, multi-agent communication assessment, and MCP supply chain evaluation. You can start with an automated scan at /scan to identify the highest-risk agents in your environment, or contact us for a scoped engagement.
The attack surface for AI agents is expanding faster than most security teams can track. The organizations that build structured testing programs now, before incidents occur, are the ones that will maintain control of their AI deployments as agent autonomy increases.
BeyondScale Team
AI Security Team, BeyondScale Technologies
Security researcher and engineer at BeyondScale Technologies, an ISO 27001 certified AI cybersecurity firm.
Want to know your AI security posture? Run a free Securetom scan in 60 seconds.
Start Free Scan