Why WAFs Miss MCP Attacks

WAFs guard the perimeter, but MCP attacks hide inside agent sessions.

WAFs check requests that cross a network perimeter, while internal MCP exchanges link agents directly to tools. Detecting these threats requires controls inside the agent session, where tool definitions become instructions and authorized access can turn into harmful action.

Why WAFs cannot see MCP traffic in the first place

WAFs were built to check North-South traffic, which is made up of requests that enter a network from outside. Internal MCP agent-to-tool communication runs East-West, between systems that are already inside that boundary. MCP uses a standardized JSON-RPC messaging layer, but the message format does not change its route. The exchange never reaches the control at the edge.

When a developer connects an AI agent to a customer database through an internal MCP server, that creates a direct path between them. After authentication at setup, later calls remain inside the network.

How MCP's design assumptions compound the blindness WAFs already have

MCP’s earlier release treated the protocol as a tool for local integration and did not require authentication or authorization. The 2026-07-28 specification revision reworked authorization around deployed OAuth 2.0 and OpenID Connect practices and deprecated Dynamic Client Registration, but most deployed servers predate those changes and remain unpatched or misconfigured. In October 2026, both official SDKs received high-severity advisories for an OAuth flaw that let a malicious MCP server redirect credentials to an attacker-controlled authorization server, tracked as CVE-2026-104850 for TypeScript and under a separate security advisory identifier for Python.

Even when a control can check traffic inside the network, the protocol still does not require authentication by default. Servers inherit the permissions granted to them, while downstream inspection tools lack a built-in way to establish whether a particular agent request was legitimately authorized. Moving inspection inside the network solves only location. It does not supply the missing evidence of permission or repair a vulnerable authorization exchange.

What WAFs are additionally blind to — the logic-based nature of MCP attacks

Even with access to internal traffic, a WAF would face a third problem. Its signatures and pattern matching look for recognizable attack content, such as a SQL fragment or a script tag. MCP attacks can instead manipulate what an agent believes it should do. Nothing about the packet needs to look wrong.

A tool description instructing a model to exfiltrate data can have the same valid structure as an ordinary description. The language model consumes that text at runtime, while the user rarely sees it in the interface. A WAF cannot inspect the model’s context window or parse its reasoning chain to establish why a call happened. A legitimate invocation and one induced by a hidden instruction can therefore look alike at the network layer.

DLP systems encounter a parallel limitation. They look for known sensitive data patterns leaving through known channels, leaving an agent’s use of legitimate credentials under the influence of injected instructions undetected. This is more than a missing pattern. The control needs to distinguish authorized access from harmful use of that access.

Tool poisoning and rug pulls — the attack classes that exploit all three blind spots simultaneously

A malicious server places instructions in a tool’s description or schema, which the agent reads as trusted context. The user may see no warning or sign of anything unusual. The agent, however, may receive directions to extract data, call restricted tools, or suppress its own notifications while its network traffic remains ordinary.

Researchers demonstrated tool poisoning that silently exfiltrated a user’s entire chat history, including credentials, tokens, and intellectual property, without a network anomaly. The poisoned tool need not even be called. Loading its description into the context window can be enough to influence how the model handles a later request. Approval of a connection therefore does not establish that everything the agent reads through it is safe.

A rug pull exploits that gap over time. A server passes review, then changes its tool definitions after approval. Most MCP hosts reload descriptions without asking the user again, bypassing the original human review. The specification’s security guidance acknowledges that one-time consent and package pinning do not cover this surface. SEP-2385, a tool authorization manifest proposal, was closed in September 2026 for rerouting through a Working Group, while SEP-2636, Tool Manifests, was transferred to the Progressive Disclosure Working Group.

Prompt injection routed through agent context rather than network requests

Prompt injection reaches the same blind spot through content the agent already has reason to read. An attacker may influence a document, a retrieval result, or a tool response without breaching the network. The agent already has the credentials and internal access. The attacker’s task is to redirect how it uses them.

Because models use the same attention mechanism to process text in the context window, they can treat hostile text supplied as data in a tool response as instructions. Authentication does not resolve that distinction. Even when the caller has supplied valid credentials, controls must answer the question of whether the model has been steered toward a harmful action. A perimeter control is not designed to answer it.

Cross-turn persistent injection keeps the attack going after the first encounter. A poisoned retrieval result early in a session can influence later actions without more attacker input, so there need not be another hostile request to intercept. OWASP’s MCP Top 10 for 2026 classifies this as MCP06, Prompt Injection via Contextual Payloads, also called Intent Flow Subversion. The name identifies the underlying substitution. The agent’s intended goal gives way to the attacker’s goal inside an otherwise legitimate session.

Supply chain attacks that reach agents through the MCP registry itself

Attackers can also supply the server before an organization connects it. In February 2026, SmartLoader hackers cloned the legitimate Oura MCP project and distributed a trojanized version through public MCP registries, using fake contributors and multiple forks to manufacture credibility. The package delivered StealC information-stealing malware targeting developer credentials, browser passwords, API keys, and cryptocurrency wallets.

Socket’s February 2026 research documented SANDWORM_MODE, involving malicious npm packages published under the aliases official334 and javaorg. These packages installed a rogue MCP server into Claude Code, Claude Desktop, Cursor, VS Code Continue, and Windsurf/Codeium configurations. Prompt injections were buried in the tool descriptions.

The August 2026 Shai-Hulud wave compromised hundreds of npm packages. Separately, registry.modelcontextprotocol.io served as a distribution channel through a single listed MCP server entry, V.A.P.E. Its linked package was clean, but its linked repository was not, and the entry remained for several days before removal. In September 2026, a hijacked maintainer account shipped a malicious release of a legitimate MCP server with valid npm provenance, allowing standard provenance checks to pass.

A WAF could see routine HTTPS package downloads. By the time the organization connected the server, the payload was already inside.

The STDIO design flaw that makes configuration itself a code-execution surface

OX Security’s April 2026 research identified a different entry point in MCP’s STDIO transport. Configuration parameters pass straight to the host operating system’s shell without input sanitization, so process commands can run whether or not they initialize a valid MCP server. Configuration itself becomes the code-execution surface. The specification’s security policy classifies this as expected behavior.

The Cloud Security Alliance AI Safety Initiative’s 2026 estimate put the exposure at 200,000 vulnerable instances across the official Python, TypeScript, Java, and Rust SDKs. April 2026 incidents weaponized the behavior in Letta AI through authenticated remote code execution and in LangFlow through an unauthenticated session token endpoint combined with exposed MCP configurations. Flowise also experienced security filter bypass.

Because the specification excludes this behavior from security reports, no CVE or protocol-maintainer patch will address the design property. The payload arrives as configuration during a legitimate setup flow, and execution happens on the host beneath network inspection. The deployment-layer response is pre-configured allowed-command lists or explicit “dangerous mode” flags.

CVE-2026-33032 (MCPwn) as a concrete illustration of what WAF blindness costs

CVE-2026-33032, informally called MCPwn, shows the consequences of an unprotected internal MCP endpoint. A missing authentication check in nginx-ui’s MCP integration let unauthenticated attackers invoke tools and take full administrative control of managed Nginx servers. The vulnerability received a CVSS score of 9.8. Rapid7 reported exploitation after the patch shipped in March 2026.

The attack path involved an unauthenticated request to an MCP endpoint triggering a configuration reload. In an internal deployment, that path does not cross the perimeter, and its traffic looks like ordinary administrative activity at the network layer. A WAF watching external requests has no view of it. Yet control of the Nginx configuration can let an attacker capture credentials in transit or take down the backend applications it proxies.

What the governance record now requires that WAFs cannot provide

WAF logs record requests at the perimeter but leave out the internal tool calls through which agents use their access. A policy stating that unauthorized access is blocked does not demonstrate that a control operated. The evidence has to come from the enforcement point.

The EU AI Act and HIPAA Technical Safeguards impose binding audit and evidence requirements, for which policy documentation without technical proof of enforcement is insufficient. The U.S. Treasury’s Financial Services AI Risk Management Framework also calls for audit evidence, but following its guidance is voluntary and it adds no new legal duties. These are distinct regulatory positions.

OWASP’s MCP08, Lack of Audit and Telemetry, identifies missing tool invocation logs as a condition that makes breaches undetectable. When agents hand tasks to agents in other organizations, each hop is a separate permission event and needs its own log. Inheriting permission from an orchestrator instead creates cascading access risk. Detection and audit therefore need to follow the delegation chain.

What detection actually requires when the threat lives inside the agent session

Tool description fingerprinting must detect, log, and block changes after initial registration before they reach the agent. That closes the rug pull window. Real-time intent monitoring must also compare actions with the assigned goal, inspecting reasoning at call time.

Those controls need a model of meaning. Detecting tool poisoning, prompt injection, intent drift, and exfiltration requires understanding tool descriptions and agent context. Each invocation must also be tied to a specific identity, using SSO, SCIM-based identity management, or just-in-time credentials as appropriate to the identity and access process. The audit record must show who authorized which action and when. Tamper-proof logs with full OTEL tracing record the tool calls, agent actions, and identity assertions within a session that perimeter logs cannot show.

Deployment also has to make correct connections straightforward. A platform that handles OAuth and credential complexity can make the secure path easier than bypassing controls to move faster.