Skip to main content
USA-Based Digital Agency

AI security guide · Updated

MCP security risks and how to fix them

The Model Context Protocol (MCP) connects AI assistants to tools and data. That makes every MCP server a path from a model to real systems. The main risks are malicious tool descriptions, servers that accept the wrong tokens, requests sent to internal addresses, and local servers running commands without consent. The MCP specification names most of them and states the required fixes.

By George Shvaya, founder of Webvello · Published

Key takeaways

  • The current MCP specification is version 2026-07-28, and its Security Best Practices page documents confused deputy, token passthrough, SSRF, state handle hijacking and local server compromise.
  • Tool poisoning, disclosed by Invariant Labs in April 2025, hides instructions in tool descriptions that the model sees and the user does not.
  • MCP servers must not accept tokens that were not issued for them; passing a client’s token through to another API is an anti-pattern the spec forbids.
  • Two 2025 CVEs in widely used MCP tooling, MCP Inspector (CVE-2025-49596) and mcp-remote (CVE-2025-6514), were rated critical and fixed in later versions.
  • Authorization is optional in MCP, so a remote server is only as safe as the auth its builder added.

Why does MCP need its own security review?

MCP turns a model’s text output into actions on other systems, using credentials the model never should hold directly.

MCP is an open protocol. A host application, such as an AI assistant or coding agent, connects to MCP servers, and each server exposes tools the model can call. If you are new to it, start with our MCP guide.

The specification changes. Its versioning page lists 2026-07-28 as the current version, and the security guidance differs between versions. Review servers against the version they implement.

Which risks does the MCP specification document?

The spec’s Security Best Practices page names each risk and, for most, states what implementations MUST do.
Risks documented on the MCP Security Best Practices page, with the required mitigation (specification 2026-07-28, checked November 16, 2026)
RiskWhat happensRequired or recommended fix
Confused deputyA malicious client obtains authorization codes without proper user consent, through a proxy server using a shared client IDProxies MUST implement per-client consent
Token passthroughA server accepts a token from a client without validating it was issued to that server, and passes it onServers MUST NOT accept tokens not explicitly issued for them
Server-side request forgery (SSRF)A client is induced to make HTTP requests to unintended destinations, such as cloud metadata endpointsValidate and restrict the URLs a client will fetch during discovery
State handle hijackingSomeone who obtains a state handle uses it to act as another userServers MUST NOT treat possession of a state handle as authentication
Local MCP server compromiseA local server runs commands on the user’s machineClients MUST get consent before executing commands; sandboxing is recommended
Excess scopes (scope minimization)Tokens carry more permission than the task needsRequest minimal scopes and add more only when needed

Source: MCP Security Best Practices. The page also covers authorization URL validation, stdio transport in proxy setups, mix-up attacks and localhost redirect impersonation. The authorization section says authorization is optional, but when it is used, authorization servers must implement OAuth 2.1 and clients must use resource indicators (RFC 8707).

What is MCP tool poisoning?

Tool poisoning is prompt injection delivered through a tool’s own description.

Invariant Labs described it in April 2025: “malicious instructions are embedded within MCP tool descriptions that are invisible to users but visible to AI models” (Invariant Labs). Because the model reads every connected server’s tool descriptions, one malicious server can try to steer how the model uses another, trusted one.

A month later Invariant showed a related problem with the GitHub MCP server: a public issue containing instructions could lead an agent to copy private repository data into a public pull request. Invariant noted it was “not a flaw in the GitHub MCP server code itself” but in how the agent was allowed to combine access (Invariant Labs). See prompt injection for why this class of attack is hard to stop.

  • Show users the full tool descriptions a server provides, not a shortened label.
  • Pin server versions and verify them, so a description cannot change silently after approval.
  • Keep servers with access to private data separate from servers that read untrusted public content.
  • Limit each agent session to the repositories, folders or accounts its task needs.

Running or building an MCP server?

Tell us what it connects to. We will tell you what an attacker could reach through it and what to fix first.

Have MCP tools had real vulnerabilities?

Yes. Two critical CVEs in 2025 hit tools developers run on their own machines.
Critical vulnerabilities in MCP developer tooling, 2025 (NVD and GitHub advisories)
CVEPackageIssueSeverityFixed in
CVE-2025-49596@modelcontextprotocol/inspectorRemote code execution from missing authentication between the Inspector client and proxyCVSS 4.0: 9.4 Critical0.14.1
CVE-2025-6514mcp-remoteOS command injection when connecting to an untrusted MCP server, via a crafted authorization endpoint URLCVSS 3.1: 9.6 Critical0.1.16

Both are developer tools, which is the point: MCP risk is not only in production servers but in what runs on the laptops of the people building them. Keep MCP tooling updated like any other dependency; our dependency triage guide covers how to decide what to fix first.

MCP server security checklist

What we check when we review an MCP server, whether we built it or someone else did.
  • Remote servers require authorization, and tokens are validated for audience: issued to this server, for this resource.
  • No token passthrough: the server uses its own credentials for downstream APIs, scoped to the task.
  • Each tool does one thing, with the narrowest data access that works, and write tools are separate from read tools.
  • Tool output is treated as untrusted when it goes back to the model or on to another system.
  • URLs the server or client fetches are validated, and internal addresses and metadata endpoints are blocked.
  • Consequential actions need confirmation from a person in the host application.
  • Secrets live in a secret store or environment, never in tool descriptions, prompts or logs.
  • Every tool call is logged with who, what and when, and logs are reviewed.
  • Dependencies, including MCP SDKs and tooling, are pinned and patched.

Pages that go deeper on the pieces this one touches.

Common questions

Straight answers to what owners ask us first.

Is MCP secure?

The protocol defines security requirements, but much depends on implementation. Authorization is optional in the specification, so a remote MCP server without it is open to anyone who can reach it. A well-built server with scoped tokens, narrow tools and consent for actions is a reasonable design; a quickly built one can expose everything its credentials reach.

Should we use third-party MCP servers?

Treat them like any dependency that runs with your permissions. Review what each tool does and reads, pin the version, prefer servers from the vendor whose API they wrap, and do not connect a server that reads untrusted content in the same session as one that holds sensitive access.

What changed in the 2026 MCP specification?

The 2026-07-28 version is the current one. Among security changes, the Security Best Practices page replaced its session hijacking section with state handle hijacking, and the authorization section now prefers Client ID Metadata Documents over Dynamic Client Registration.

Can you audit our MCP server?

Yes. Our MCP server security audit reviews authorization, token handling, tool scopes, input and output handling, and dependencies against the current specification, and gives you a fix list.

Get your MCP server reviewed

We audit MCP servers against the current specification and fix what we find.