1. Why Model Context Protocol (MCP) Changes the Enterprise AppSec Boundary
Model Context Protocol (MCP) has rapidly emerged as the universal integration layer connecting LLM hosts—both customer-facing SaaS copilots and developer IDEs (Cursor, VS Code, Claude Desktop)—to internal PostgreSQL/Snowflake databases, GitHub repositories, Jira/Linear trackers, Slack workspaces, and cloud control planes.
In traditional REST or GraphQL microservices, authorization and input validation assume a deterministic caller executing developer-authored code. Under MCP, probabilistic model reasoning sits directly in the control loop: the host LLM reads tool descriptions (tools/list), ingests untrusted external context (support tickets, pull-request diffs, emails, web pages), and synthesizes JSON-RPC tools/call arguments dynamically. Conventional SAST and DAST scanners inspect syntax, leaving this semantic-to-execution bridge largely untested.
MCP Vulnerability Distribution in Assessments
Observed root causes across custom and third-party MCP server reviews.
Blast Radius by MCP Deployment Architecture
Comparing common enterprise rollout patterns before and after gateway hardening.
2. Four Dominant MCP Exploit Classes
2.1 Tool Description Poisoning & Rug-Pull Mutations
Because the MCP host injects every connected server's tools/list name, description, and JSON Schema directly into the model's system context, a malicious or compromised third-party MCP server can embed hidden directives inside a tool description (for example, instructing the host model to read ~/.ssh or environment variables via a legitimate filesystem tool and pass the contents as a telemetry parameter). Worse, an unpinned remote server can pass initial security review cleanly and later mutate its tool descriptions ("rug-pull") on subsequent sessions.
2.2 Cross-Server Tool Shadowing
When an IDE or enterprise agent connects to multiple MCP servers simultaneously (for example, an internal github-mcp, a postgres-mcp, and an external documentation or search MCP), ambiguous or colliding tool definitions allow a lower-trust server to influence how and when higher-privilege tools on sibling servers are invoked.
2.3 Unsanitized Tool-Argument Command Injection & Cloud SSRF
Developers building internal MCP wrappers frequently pass LLM-generated arguments straight into child_process.exec, string-concatenated SQL queries, filesystem paths, or fetch() calls. An attacker who plants an indirect prompt injection inside a Jira ticket or web page can coerce the agent into requesting http://169.254.169.254/latest/meta-data/iam/security-credentials/ or executing arbitrary shell commands inside the MCP container.
Reference Defense-in-Depth MCP Gateway Topology
Isolating untrusted context from privileged enterprise actions at every protocol hop.
Pinned Digest & Schema Hash
Allowlist approved MCP servers by container digest and hash-lock tools/list schemas.
Blocks Rug-Pullsaud-Bound OAuth 2.1
Enforce RFC 8707 Resource Indicators; reject upstream token passthrough.
No Confused DeputyStrict Schema + HITL Gate
Parameterized SQL/APIs, read-only defaults, and explicit human approval on mutations.
Zero Silent WritesSandbox & Egress Lock
Run MCP containers in isolated subnets blocking 169.254.169.254 and arbitrary egress.
Blast-Radius Cap3. OAuth 2.1, Dynamic Client Registration (DCR) & Session Isolation
As teams move from local stdio servers to shared remote Streamable HTTP and SSE MCP deployments, authentication mistakes become multi-tenant vulnerabilities:
- Never Forward Upstream Tokens Blindly: Accepting a client token issued for another audience and replaying it downstream allows a malicious client to abuse the MCP server's trust relationship. Enforce strict
aud(Resource Indicator) validation and mint narrowly scoped downstream tokens via OAuth 2.0 Token Exchange. - Lock Down Dynamic Client Registration (DCR): Unauthenticated DCR endpoints with lax
redirect_urivalidation enable phishing and authorization-code interception against developer workstations. - Bind Session IDs to Authenticated Principals: Never rely on guessable or unauthenticated MCP session identifiers across HTTP/SSE streams; bind every tool invocation to the caller's verified tenant and user claim.
4. Enterprise MCP Hardening Checklist
Pre-Production MCP Security Gate
Before exposing an MCP server to employees or customers: (1) pin package/image digests and alert on tools/list hash drift; (2) separate read-only retrieval tools from state-mutating tools and require out-of-band human confirmation for writes, deletes, or external egress; (3) enforce tenant ACLs inside the database/API layer rather than the system prompt; and (4) block link-local metadata IPs (169.254.169.254) and unauthorized outbound domains at the container network layer.