MCP Vulnerabilities: Known Risks and Defenses

The major MCP attack classes in one place, with defenses for each.

Ready to protect your own setup?

MCP vulnerabilities are real and growing. The Model Context Protocol gives AI agents access to external tools, and those tools introduce attack surface that did not exist when agents only processed text. Every MCP connection is a trust boundary, and most agents cross it without any inspection.

This page is the canonical reference for known MCP vulnerabilities. It catalogs the attack classes, lists the public CVEs, cites primary sources, and names the defenses that apply to each class. For the full ecosystem snapshot, see the State of MCP Security 2026 report.

Are MCP servers safe?

MCP servers can be used safely, but installing one gives software access to whatever its process and credentials can reach. Safety depends on the server’s source, the client, its permissions, the data returned by tools, and how updates are handled. A well-maintained server with narrowly scoped access and current patches presents a different risk from an unknown package running with broad filesystem and network access.

Review the command and package before connecting, limit its permissions, and keep it patched. Treat tool descriptions and returned content as untrusted input. The MCP security best practices cover local servers, authorization, and network access. See also AI agent security and Claude Code security.

What are MCP vulnerabilities

An MCP vulnerability is any defect in the Model Context Protocol ecosystem that an attacker can use to steal data, execute code, bypass controls, or manipulate an agent’s behavior. The definition covers every layer: the protocol, the servers that implement it, the clients that consume it, the packages that ship those servers, and the configs that wire them together.

Four properties make MCP different from classic web or API security. Tool descriptions are documentation the agent acts on, so they are executable surface. Tool responses are data the agent acts on, so they are executable surface too. Most MCP servers run with broad local filesystem or network access. The specification also defines authorization requirements, but implementation, permissions, response integrity, and audit remain important operational concerns. Every attack class below follows from one of those four properties.

The vulnerability landscape in 2026

The Vulnerable MCP Project tracked over 50 known MCP vulnerabilities as of April 2026, with 13 rated critical. Public CVE databases show dozens of MCP-related disclosures in the first months of 2026 alone. That is a lower bound. The real count is higher because many MCP servers are first-party internal tools that never get a CVE number when they get fixed.

Scale is worse at the implementation level. Endor Labs’ analysis of 2,614 MCP implementations found that 82% use file operations prone to path traversal, 67% use APIs related to code injection, and 34% use APIs susceptible to command injection. Invariant Labs demonstrated in April 2025 that tool descriptions enter the agent’s context as trusted content, making tool poisoning attacks effective. The risk increases in clients that auto-approve tool calls, where no human reviews the description before execution. The ecosystem shipped faster than it hardened.

Categories of MCP vulnerabilities

MCP vulnerabilities fall into nine recurring classes. The rest of the page covers each in detail with the cited CVEs and public incidents.

ClassWhere the bug livesDetection surface
Tool description poisoningMCP server metadataTool description scanning
Rug-pull driftMCP server metadata over timeDrift detection and hash fingerprinting
Command injection / RCEMCP server codeInput validation, server-side sandboxing
Path traversalMCP filesystem serversCanonicalization, chroot, policy
SSRFMCP client and server requests, including OAuth discoveryDestination allowlists, resolved-address checks
Supply chain backdoorPackage registry, binary distributionSBOM, provenance, hash pinning
Authorization / authentication gapsServer, client, and OAuth flow implementationsOAuth 2.1, scoped tokens, consent checks
Prompt injection in responsesTool output contentResponse scanning
Shadow MCPInventoryDiscovery, egress control

Each row is a different defense story. No single control catches all of them, which is why the State of MCP Security 2026 report grades six defense categories against these rows.

Tool description poisoning

A malicious MCP server hides instructions in its tool descriptions. When the agent calls tools/list, those instructions enter the context window. The agent follows them because it cannot distinguish documentation from commands.

The attack is not limited to the description field. Instructions can hide in parameter names, default values, enum options, and example values. CyberArk’s “Poison Everywhere” research demonstrated encoding exfiltration instructions in MCP tool parameter names. Invariant Labs published the canonical tool poisoning disclosure in April 2025, demonstrating that the attack works because tool descriptions enter the context as trusted content.

Defense. For tool definitions routed through its MCP proxy, Pipelock extracts text recursively from the full tool definition and scans it for injection patterns. The full breakdown lives in MCP Tool Poisoning and the tool-poisoning attack surface post.

Rug-pull drift attacks

The server returns clean tool descriptions initially. After the agent starts using the tools, subsequent tools/list responses contain modified descriptions with hidden instructions. Any check that only runs at session start misses this completely.

The canonical public demonstration is the Invariant Labs WhatsApp MCP rug-pull. A trivia game MCP server with hidden instructions targeted a legitimate whatsapp-mcp server connected to the same agent. The agent pulled WhatsApp history through the trusted server and leaked it as outbound traffic. End-to-end encryption did not help because exfiltration happened above the encryption layer, through the agent’s own authorized access.

Defense. For servers routed through its MCP proxy, Pipelock fingerprints every tool definition with SHA-256 on first contact and compares later responses against that baseline. A change triggers an alert or block with a diff of what changed. Review changes before allowing sensitive actions.

Command injection and RCE in MCP servers

Several MCP servers have shipped with input validation bugs severe enough to give an attacker remote code execution. These are not protocol-level bugs, but they are MCP bugs in the sense that the MCP attack surface makes them reachable from agent traffic.

The public CVE table covers flaws in mcp-server-git, the mcp-remote client, and MCPJam Inspector. The issues have different prerequisites and fixes; check each advisory against the version and configuration in use.

The common thread is that MCP server code runs with agent-supplied arguments. Any argument that reaches a shell, a subprocess, or an unsafe library call is a potential RCE.

Defense. Input validation inside every MCP server, least-privilege filesystem access, sandboxing the MCP process, and runtime DLP on argument patterns that match shell escape sequences. A runtime proxy that scans tool arguments catches a subset before they reach the vulnerable server.

Path traversal in MCP filesystem servers

Path traversal is the single most common MCP server vulnerability. Endor Labs found that 82% of 2,614 MCP implementations use file operations prone to path traversal.

The MCP filesystem server has had two published path-validation flaws, CVE-2025-53109 and CVE-2025-53110. The first involved symlinks; the second involved paths sharing an allowed directory prefix. Both advisories recommend upgrading to 2025.7.1.

The pattern repeats across third-party servers. Symlinks, .. segments, and Windows alternate data streams all defeat naive string checks. Server authors frequently check the path string for .. before joining, which misses the case where the joined path resolves outside the base.

Defense. Canonicalize every path before authorization. Reject escaping symlinks explicitly. Put each filesystem MCP server in a chroot, container filesystem, or bind-mount with only the directories it needs. Scan tool arguments for known traversal patterns at the proxy layer.

Supply chain attacks on MCP packages

postmark-mcp npm backdoor. An npm package named postmark-mcp, impersonating a legitimate Postmark integration, shipped 15 clean versions (1.0.0 through 1.0.15) to build trust. Reported version 1.0.16, released September 17 2025, added one line of code that BCC’d every outgoing email to phan@giftshop.club. Reported weekly downloads were around 1,500. Koi Security disclosed the backdoor on September 25 2025 and estimated roughly 300 organizations had integrated the package. This is the first publicly documented in-the-wild malicious MCP server. Primary sources: Snyk: Malicious MCP Server on npm and Koi Security.

The postmark-mcp pattern is the template attackers will reuse. A maintainer ships a legitimate MCP server, builds download volume, then inserts the backdoor in a minor release. Agents auto-pull the latest version. Static scanners that checked the package at initial approval miss everything.

Defense. Supply chain verification as a first-class control. SBOM on every MCP server, including upstream dependencies. Pin versions by hash and reject unpinned servers in CI. Inspect outbound traffic where practical, recognizing that controls cannot inspect connections that bypass them.

Authorization and authentication gaps

MCP defines authorization requirements for HTTP-based connections, but implementations and deployments can still have authorization gaps. Shared service-account tokens can also give multiple agents broader access than they need.

Check Point’s MCPoison research (CVE-2025-54136) describes a Cursor IDE configuration approval that remained in effect after an MCP configuration changed. Cursor fixed it in version 1.3. Revalidate configuration changes and tie approval to the current configuration.

Defense. Mandatory re-approval on any MCP config change. Per-agent identity with scoped tokens. File integrity monitoring on MCP config paths. The full breakdown lives in MCP Authorization.

Credential exposure, SSRF, and confused deputy attacks

Credentials can leak through tool arguments, logs, server configuration, or outbound requests. Use short-lived, narrowly scoped credentials, keep secrets out of tool descriptions and logs, and rotate exposed tokens. The MCP security guidance warns against passing a client token to a downstream API without validating that it was issued for the MCP server.

Server-side request forgery (SSRF) occurs when an attacker causes a client or server to request an unintended destination. Malicious OAuth discovery metadata can, for example, point an MCP client at an internal service. Restrict destinations and validate redirects and resolved addresses. The same MCP guidance describes these controls and DNS rebinding risks.

An MCP server that proxies access to a third-party API can become a confused deputy when it uses its own authority on behalf of a client without the right consent checks. The MCP guidance describes a flow involving a shared OAuth client ID and a previously stored consent cookie. It calls for per-client consent, exact redirect URI validation, and OAuth state validation.

Defense. For traffic routed through its proxy, Pipelock scans URLs and tool arguments for credential patterns and blocks requests to private, loopback, link-local, and cloud metadata addresses, checking resolved IPs to stop DNS rebinding. Configured MCP upstreams may run on private addresses, but metadata endpoints stay blocked. Token audience checks, consent, and redirect validation belong in the MCP server and client, not the proxy.

Prompt injection in tool responses

A tool returns content that contains hidden instructions targeting the agent. The agent reads the response, processes the injected instructions, and follows them. This is indirect prompt injection delivered through the MCP channel instead of a web page.

The canonical public demonstration is Invariant Labs’ GitHub MCP exploit. The widely used GitHub MCP server (reported at around 14,000 stars at disclosure) was hijacked through a malicious GitHub Issue. When the agent read the issue, it followed embedded instructions and exfiltrated contents from private repositories the user had authorized. Tool descriptions were clean. The poisoning sat in the data the tool returned.

Defense. For traffic routed through its MCP proxy, Pipelock scans tool responses for known injection patterns, using 34 injection patterns across six response-scanning passes: normalized text, invisible-with-space retry, leetspeak, optional-whitespace variants, vowel-folded variants, and base64/hex decode. Detection is not a guarantee that all malicious instructions will be caught. Treat inbound tool output as untrusted the way a browser treats HTML.

Shadow MCP and inventory gaps

A shadow MCP server is an MCP server the security team does not know about. A developer installs one locally, a plugin spins one up inside an IDE, or an agent downloads one on demand. None of the defensive controls above help if the traffic does not reach the proxy.

Shadow MCP is not a single CVE. It is an inventory failure that compounds every other vulnerability on this page. Without an inventory, the postmark-mcp victims had no chance to audit their packages and the MCPoison victims had no chance to revalidate.

Defense. Network egress control that forces all agent traffic through an inspection point. Continuous inventory of MCP servers running on developer machines and in CI. Detection of new outbound destinations and new tool hashes in logs. The full breakdown lives in Shadow MCP.

CVE patterns and disclosure timelines

These public CVEs affect particular implementations and versions, not every MCP deployment. Check each advisory against the version and configuration you run.

CVE and sourceAffected package and issueFixed version
CVE-2025-53109@modelcontextprotocol/server-filesystem could access unintended files through symlinks in allowed directories.2025.7.1
CVE-2025-53110@modelcontextprotocol/server-filesystem could allow unintended file access when a path shared an allowed directory prefix.2025.7.1
CVE-2025-68143mcp-server-git allowed git_init to create repositories at arbitrary accessible paths.2025.9.25; the tool was removed. Use 2025.12.18 or later to fix the full chain.
CVE-2025-68144mcp-server-git passed unsanitized arguments to Git, allowing options that could overwrite files.2025.12.18
CVE-2025-68145mcp-server-git did not enforce its configured repository restriction on subsequent tool calls.2025.12.18
CVE-2025-6514mcp-remote could execute operating system commands when an untrusted server supplied a crafted authorization URL.0.1.16
CVE-2026-23744@mcpjam/inspector exposed an HTTP endpoint that could execute commands.1.4.3
CVE-2025-54136Cursor IDE kept trusting an approved MCP configuration after it changed (MCPoison).Cursor 1.3

A CVE identifies a disclosed flaw, not proof that your installation is exposed. Check the affected version, configuration, and reachability in the advisory. Other incidents, including tool poisoning demonstrations, may not have a CVE.

How to find vulnerabilities in your MCP servers

No single tool covers every class above, so the workflow combines four layers.

Start with the public trackers. The Vulnerable MCP Project is the community CVE index. The OWASP MCP Top 10 is the category framework in beta as of 2026. Both give you the vocabulary and known-bad list before you scan your own servers.

Run a static scanner against tool definitions. Cisco mcp-scanner and Snyk agent-scan (the former Invariant mcp-scan) analyze tool definitions and configs before the server ships. Backslash Security says it rates MCP servers and allows approval before installation. Its endpoint MCP proxy inspects communication between agents and MCP servers. See MCP security tools for the landscape.

Route live traffic through a runtime inspection proxy. Static scanners miss rug-pulls, response injection, credential leaks in arguments, and poisoned data returned at runtime. An inspection proxy (MCP Proxy, Agent Firewall) scans tool descriptions on every session, arguments on every call, and responses on every reply.

Audit the inventory. Walk every developer machine and CI runner. List every MCP server. Check binary hashes and SBOMs against published releases. Flag any server without an approval ticket. See Shadow MCP. The MCP security best practices checklist pulls the short operator steps together.

Mitigation layers

The State of MCP Security 2026 matrix rates six control categories against the OWASP MCP Top 10. The simpler version for this page is five mitigation layers that belong in every serious posture.

LayerPrimary classes caughtExample tools
Network egress allowlistShadow MCP, SSRF, supply chain destinationsgh-aw-firewall, iron-proxy
MCP gatewayAuth gaps, shadow MCP (within scope), routing and auditDocker MCP Gateway, MintMCP, agentgateway
Static scannerTool poisoning, some supply chainCisco mcp-scanner, Snyk agent-scan
Runtime inspectionRug-pull, response injection, credential exfil, argument DLPPipelock, Nightfall, Operant AI
Identity and auditAuth gaps, telemetry, incident responseOAuth 2.1 stacks, audit log pipelines

No layer is a full answer. Runtime inspection is the widest because it sees content, but it does not replace authentication and cannot catch an agent that bypasses the proxy. Static scanning catches static poisoning but misses rug-pulls. Gateways centralize authentication but only for agents that use the gateway. Network allowlists block destinations but do not look inside traffic. Put a layer from each row in front of every agent that speaks MCP. What slips through one row should be caught by the next.

Practical risk-reduction steps

  1. Inventory servers, startup commands, versions, owners, credentials, and reachable data. Remove servers that are no longer needed.
  2. Check client and server advisories, pin reviewed packages, and review updates and dependencies.
  3. Restrict filesystem paths, network destinations, and token scopes. Sandbox local processes and require approval for sensitive actions.
  4. Authenticate remote connections, validate token audiences and redirect URIs, and use per-client consent for third-party authorization flows.
  5. Review tool definitions when they change and inspect calls and responses where appropriate. Detection can miss attacks and only covers traffic routed through the control.
  6. Record approvals and security events without recording secrets. Investigate unexpected destinations, tool changes, and denied actions.

Pipelock can inspect MCP tool definitions, calls, and responses routed through its MCP proxy. It can help detect secret leaks and known prompt-injection and tool-poisoning patterns on that path. It does not patch servers or inspect connections that bypass it. The open-source AI firewall guide explains the deployment pattern.

Further reading

Frequently asked questions

Are MCP servers safe?
MCP servers can be used safely when their source, permissions, configuration, and updates are reviewed. Safety depends on the particular server and client, the data they can access, and the controls around them.
What are the main MCP security vulnerabilities?
Tool poisoning, rug-pull attacks, credential theft through tool arguments, prompt injection in tool responses, SSRF, confused deputy attacks, authorization gaps, path traversal and command injection inside MCP server implementations, supply chain backdoors in published MCP packages, and shadow MCP servers that bypass inspection.
How do MCP vulnerabilities differ from general LLM security risks?
LLM vulnerabilities exist in the model’s input and output. MCP vulnerabilities sit in the servers, clients, and tool traffic around the model: tool descriptions that carry hidden instructions, tool arguments that leak secrets, tool responses that contain injection payloads, and server-side bugs (path traversal, argument injection, RCE) that turn agent requests into shell access.
Do MCP servers have CVEs?
Yes. Public advisories include CVE-2025-53109 and CVE-2025-53110 in the MCP filesystem server, and CVE-2025-6514 in mcp-remote. Check the affected versions and fixes in each advisory.
How many MCP CVEs have been published?
The Vulnerable MCP Project tracks over 50 known MCP vulnerabilities as of April 2026, with 13 rated critical. Notable disclosures include the Anthropic mcp-server-git RCE chain (CVE-2025-68143/68144/68145), Anthropic Filesystem MCP EscapeRoute (CVE-2025-53109/53110), MCPoison in Cursor IDE (CVE-2025-54136), mcp-remote command injection (CVE-2025-6514), and MCPJam Inspector RCE (CVE-2026-23744).
Can MCP vulnerabilities be fixed by the MCP protocol itself?
Some flaws are in servers and clients, while others arise when untrusted tool descriptions and responses enter an agent’s context. Protocol improvements and runtime inspection can reduce risk, but cannot eliminate every attack.
How do I find vulnerabilities in my MCP servers?
Start with the Vulnerable MCP Project CVE tracker and OWASP MCP Top 10. Run a static scanner against tool definitions (Cisco mcp-scanner, Snyk agent-scan). Route live traffic through a runtime inspection proxy that scans tool descriptions, arguments, and responses on every call. Audit the inventory for shadow MCP servers. Check binaries against published hashes and SBOMs.

Ready to protect your own setup?

See Assess reports →