Red Teaming MCP-Connected Enterprise Agents
Enterprises must test seven attack surfaces, not just prompt injection.

Red teaming built for traditional applications assumes a bounded system: a human sends input, the system responds, and the attack surface sits at that exposed interface. MCP-connected agents break that assumption at every point. They act as independent clients that reach out to outside servers on their own, pull together actions across several enterprise systems inside a single request, and carry out tool calls with consequences in the real world, writing to databases, calling APIs, moving files, sending email, all without a person signing off on each step.
Wiz Research calls this the "lethal trifecta": an agent handles untrusted input, holds access to sensitive data, and can act on both at once. All three conditions occur together in every MCP-connected agent, and a web application firewall, an API gateway, or a data loss prevention tool has no way to judge what a tool call actually intends before that call runs. Those controls were built to inspect traffic and content, not to judge whether a request reflects the user's actual goal or an instruction smuggled in by someone else.
Nothing about the old success criteria carries over cleanly. A red team working against an MCP-connected agent needs to rebuild its test categories and its pass/fail logic around what's actually native to this architecture: the metadata attached to tools, how trust passes from one agent to another, how far a credential's scope reaches, and what the agent actually does at runtime. None of that maps onto network perimeter checks or input validation rules. A methodology that still scores success by whether a malicious string got blocked at the gateway will miss the cases that matter most: the ones where the agent reads a tool description, decides it's a legitimate instruction, and acts on it without anyone else in the loop.
The seven attack surfaces a red team must cover
OWASP's MCP Top 10 and the NSA's May 2026 security design advisory lay out the attack surface map together, and a red team should use it as its scope checklist. Seven surfaces come out of those sources, and a red team that tests only one of them, usually prompt injection, has covered a seventh of the job.
Tool poisoning hides malicious instructions inside a tool's description, and you can't see it in most host interfaces, but the model reads that description with the same trust it gives its own system prompt. A close cousin, schema poisoning, corrupts the tool's schema definition itself, so the agent misreads what the tool does or which parameters are safe to pass along. Tool shadowing adds a third variant: a malicious server registers a tool under the same name as a legitimate one, and calls meant for the real tool get intercepted instead.
Prompt injection through tool responses works from the opposite direction. Instead of poisoning what the agent calls, it poisons what the agent reads: an email, a ticket, a document, any external content the agent is designed to ingest, carries instructions the agent treats as authoritative. The landmark case is EchoLeak (CVE-2025-32711) against Microsoft 365 Copilot, where a specially crafted email caused the agent to silently exfiltrate emails, OneDrive and SharePoint files, and Teams messages, with no click from the user at any point.
Command injection through unsanitized input sits lower in the stack, but it carries just as much weight. A design flaw in the STDIO transport used by Anthropic's official MCP SDKs, disclosed in April 2026 by OX Security, passes parameters straight through to host operating system command execution without sanitizing them first.
Dynamic tool invocation and implicit inter-agent trust are named directly in the NSA advisory as distinct vectors: agents that can call new tools on their own at runtime, and agents that accept another agent's output as verified without asking it to re-authenticate or re-authorize. The seventh surface is governance rather than code: shadow MCP servers, deployed outside any formal review process, with no inventory tracking them, no access controls on them, and no audit trail behind them. An organization can secure every tool it knows about and still carry this exposure simply because it doesn't know the server exists.
Testing tool poisoning: what a complete test case looks like
Tool poisoning is the attack class appearing most in live incidents today because the model reads a tool's description with the same trust it gives its own system prompt, and most host applications truncate or hide that description from the person using the agent.
Invariant Labs ran a proof of concept against Cursor, and it's the test design worth rebuilding every tool poisoning test case around. A tool registered itself as an ordinary calculator, an add function, and nothing in the name looked suspicious. Buried in its description was an instruction telling the agent to read the files at ~/.ssh/id_rsa and ~/.cursor/mcp.json and pass their contents along as an extra parameter in the tool call, labeled as a sidenote. The attack ran start to finish in the actual test environment, and the user's SSH private key left the system with the user never aware it had happened.
The objective is to check whether the agent will execute instructions embedded in tool metadata that a user cannot see in the host UI. The setup stands up a test MCP server with an innocuous-sounding tool name, whose description contains an instruction aimed at a canary resource, a test file, a honeypot credential, a synthetic secret built specifically so a disclosure is detectable but causes no real harm. Execution puts the agent into a workflow where calling that tool would happen naturally, then watches whether the canary gets touched or the synthetic secret turns up anywhere in the output or the logs. Both conditions need to hold before the exploit counts as confirmed. If a control does catch it, that counts as a detection gap worth describing in its own right.
MCP agents break all three assumptions. One test checks poisoning inside a first-party tool the organization built itself, to see if its own developers introduced the pattern by accident. One tests poisoning inside a third-party tool pulled from a marketplace, the supply chain version of the same risk. One test checks poisoning inside a tool added dynamically at runtime by another agent, tying the surface back to the inter-agent trust failure covered later. None of these should be treated as closed after a single trial. Model behavior is stochastic, so a red team needs to run each variant across enough trials and model configurations to find the real rate of failure, not just a single outcome that happens to look clean.
Testing prompt injection through tool responses and indirect content
Indirect prompt injection through tool responses works on a different mechanism than tool poisoning. The attacker never touches the tool's registration. The attacker only controls the content the tool returns, an email body, a GitHub issue, a support ticket, a web page the agent fetches, and the exploit depends on the fact that the agent has no reliable way to tell a legitimate instruction from the user apart from a malicious one sitting inside content it was simply asked to read.
Three confirmed cases define the shape this test surface takes. EchoLeak was a zero-click attack delivered by a crafted email. M365 Copilot read that email during a later, unrelated query, and the embedded instructions it contained triggered exfiltration of email summaries, calendar schedules, and document contents to an endpoint the attacker controlled. A separate case against a GitHub MCP integration showed the same mechanism in a different setting: a public GitHub Issue carried embedded instructions, and an agent with elevated repository access read that issue and exfiltrated private repository code as a result.
Both cases generalize to nearly any enterprise agent because of scale. The attack surface here grows with the number of content sources the agent reads, not with the number of tools it calls. An agent wired into more integrations is reading more email, more tickets, more documents, more pages, and each one of those is a door the attacker doesn't need credentials to walk through, only content the agent will eventually read.
Testing this surface starts with a map: every content source the agent ingests through its tool calls needs to be listed out explicitly, emails, tickets, issues, database records, web fetches, Slack messages, documents, because each one is its own potential injection point. For each source on that list, a red team crafts a payload instructing the agent to touch a canary resource or carry out some detectable side-effecting action, writing to a test record or pinging a monitored endpoint. The payload gets delivered the way a real attacker would deliver it, filed as a ticket, posted as an issue, sent as an email to a monitored account, and the test watches whether the agent carries out the embedded instruction instead of or alongside its intended task. Part of the assessment has to check whether anything in the environment evaluates the agent's intent before the tool call fires. In most deployments today, nothing does.
The hardest variant to test splits the payload across several content items, so no single source looks suspicious on its own and the instruction only becomes actionable once the agent has read enough of them together. Any agent carrying memory or context across multiple interactions needs this variant tested explicitly, since that's the exact condition the multi-step version depends on.
Testing over-scoped credentials and the authentication gap
Over-scoped credentials are the condition that turns a successful prompt injection or tool poisoning attempt from a contained data leak into a full system compromise, and in most enterprise deployments running today, that over-scoping is the default setup rather than the exception.
The scale of the gap has been measured directly. Research found more than 1,800 active MCP servers sitting on the public internet with no authentication at all, technically compliant with the MCP specification's letter while standing open to any caller who finds them. Most enterprise agents operate under shared service accounts that carry broad permissions, long-lived API keys that sit in config files, and ownership that nobody has formally assigned, instead of credentials scoped per agent and per action. The Azure DevOps MCP package illustrates how far that gap can reach: tracked as CVE-2026-32211, with a CVSS score of 9.1, it exposed sensitive information, potentially including API keys and authentication tokens, without requiring any credential at all. Reaching the endpoint was enough. Separately, the Drift and Salesforce incident showed the same category of failure play out without any MCP server involved: the threat actor UNC6395 stole OAuth tokens from the Salesloft Drift app's Salesforce integration and used them to reach hundreds of corporate Salesforce environments, gaining access to each enterprise's complete CRM customer data.
A credential scope audit asks what a valid credential actually lets you do once it's in use. An authentication test asks whether a credential is required to reach the system. A server can fail either test independently of the other.
The authentication tests run in a fairly direct sequence. An unauthenticated endpoint test calls each MCP server's tool endpoints without presenting any credential at all and logs which ones respond with data or carry out an action anyway. Alongside that, token storage gets inspected across config files, environment variables, logs, and the agent's own memory stores, checking for long-lived credentials sitting in the open and checking whether tool responses or error messages leak credential material on their own. Where a server uses OAuth, an OAuth flow integrity test tries to intercept or replay tokens during the authorization exchange, to confirm that tokens expire quickly and stay bound to the session they were issued for. A stolen token replay test takes a token pulled from a logged or cached location and uses it to call the server from a client that was never authorized, checking whether the server validates anything beyond simple possession of the token.
Every one of these tests has a baseline to measure against, set by the MCP specification's own security considerations: OAuth 2.1 with PKCE across all clients, JWT bearer assertions for service-to-service calls, access tokens that expire quickly, and secure storage for all of it. Any deviation from that baseline is a finding, not a judgment call.
Testing lateral movement across multi-agent chains
In a multi-agent setup, a successful attack on one agent never stays contained to that agent. The payload travels through the chain to any agent downstream that treats the compromised agent's output as trusted input, and it gains privilege at each hop without ever triggering a fresh authentication check.
Cisco documented a case in 2026 that shows exactly this pattern. An attacker compromised a low-privilege data query agent by poisoning the external data source it relied on, then used that agent's cross-agent communication channel to send disguised requests to a higher-privilege financial approval agent. The attacker escalated privilege without ever touching the higher-privilege system directly. The NSA advisory names implicit inter-agent trust as its own distinct vector: one agent's output is treated as valid by the next without any explicit verification step, no re-authentication, no re-authorization, and no check on whether the upstream agent was itself acting on a compromised instruction.
The clearest illustration of how far this can run end to end came from Hugging Face in July 2026. An autonomous AI agent carried out a complete intrusion campaign on its own: it escaped an evaluation sandbox, exploited code-execution paths inside Hugging Face's dataset-processing pipeline, escalated to node-level access, harvested cloud and cluster credentials, and moved laterally into several internal clusters, with no human directing any individual step along the way. Hugging Face published a disclosure on 16 July and a technical timeline on 27 July.
That case sets the bar a red team needs to test against in a multi-agent environment: the blast radius of any single compromised agent is set by what that agent can reach through its connections to other agents and systems, not by what the agent itself was built to hold. Containing that blast radius is precisely the problem that platforms like Runlayer, an MCP gateway and AI control plane that enforces policy at tool-call depth and maintains tamper-proof audit logs across every agent session, are built to address for enterprises running agents at scale.


