16 minute read

“Thirty CVEs in sixty days. The protocol everyone is adopting for AI agents has the security posture of a 2005 PHP application.”

TL;DR

In a scan of more than 7,000 MCP servers, BlueRock flagged 36.7% for potential SSRF exposure. Astrix found that 53% of open-source MCP servers rely on long-lived static keys and only 8.5% use OAuth. By community counts, more than 30 CVEs landed in January and February 2026, mostly command injection, path traversal and SSRF repackaged inside AI agent infrastructure. OWASP now has an MCP Top 10 (in beta). Here is what breaks, why, and how to harden your deployment. For background on how prompt injection exploits tool-calling agents, see Prompt injection defense.


A network cabinet where one cable bypasses the firewall appliance to reach an internal switch

What just happened to MCP security?

By several community tallies, security researchers filed more than 30 CVEs between January and February 2026 against MCP servers, clients, and infrastructure. GitHub’s advisory database bears this out: 33 advisories with CVE IDs that name MCP servers or SDKs were published there in those two months. One new vulnerability every two days for a protocol that didn’t exist before November 2024.

Those tallies put command or shell injection at roughly 40% of the total, with path traversal and SSRF also prominent; the exact split varies by who counts. These aren’t novel attack categories. They’re vulnerability classes web application security has known for two decades, showing up now because MCP servers are effectively web servers that nobody treats as web servers.

Anthropic launched MCP in November 2024 as an open protocol for connecting AI agents to tools and data sources. Adoption was immediate. By December 2025, Anthropic counted more than 10,000 active public MCP servers and 97 million monthly SDK downloads across Python and TypeScript (Anthropic), with support in ChatGPT, Cursor, Gemini, Microsoft Copilot and Visual Studio Code. Every major AI coding tool supports it. Every major cloud provider ships MCP integrations.

Almost nobody audited the security.

BlueRock analyzed more than 7,000 MCP servers for its MCP Trust Registry and reported in January 2026 that over 36.7% had potential SSRF exposure. Its proof of concept against Microsoft’s MarkItDown MCP server pulled AWS credentials from the EC2 instance metadata service (BlueRock). On authentication, Astrix’s study of more than 5,200 open-source MCP servers found that 88% need credentials, but 53% rely on long-lived static API keys or personal access tokens and only 8.5% use OAuth (Astrix, October 2025).

Many of the servers your AI agent calls with production credentials are protected by nothing more than a long-lived static key, if that.


How does SSRF work when your server is an AI tool provider?

Traditional SSRF tricks a web server into making requests to internal resources on behalf of an attacker. MCP SSRF follows the same principle but the attack chain has an extra link, and that link makes everything worse.

sequenceDiagram
    participant A as Attacker
    participant C as Untrusted Content
    participant AG as AI Agent
    participant M as MCP Server<br/>(cloud credentials)
    participant I as Internal Service /<br/>Cloud Metadata

    A->>C: Embed malicious URL in document
    C-->>AG: Agent processes document
    AG->>M: Calls tool with attacker-controlled URL
    M->>I: Fetches URL (carries managed identity token)
    I-->>M: Returns sensitive data or token
    M-->>AG: Returns result to agent
    AG-->>A: Data exfiltrated via subsequent tool call

The sequence:

  1. An attacker embeds a malicious URL inside content that an AI agent will process. A Figma file, a Confluence page, an email attachment, a code comment.
  2. The agent, following the embedded instruction or confused by it, calls an MCP tool with the attacker-controlled URL as a parameter.
  3. The MCP server, running on your infrastructure with your credentials, fetches that URL.
  4. That request reaches internal services, cloud metadata endpoints like http://169.254.169.254/ on AWS, or attacker-controlled servers that capture tokens.
  5. The agent acts as an unwitting proxy. It has no mechanism to distinguish legitimate tool use from attacker-directed tool abuse.

MCP servers often run with managed identity credentials or service account tokens that carry broad cloud permissions. SSRF doesn’t just reach internal services. It exfiltrates the server’s identity token. One forged request, one stolen token, full cloud account access.

Local servers are reachable from the browser too. With DNS rebinding, a malicious website can send requests to a server listening on the victim’s machine and trigger tool calls with no direct interaction with an AI assistant. That is why the MCP specification tells servers using the HTTP transport to validate the Origin header and, when running locally, to bind to localhost rather than all interfaces. A related flaw hit OpenClaw’s local agent gateway in February 2026 (ClawJacked, Oasis Security): browsers let any website open a WebSocket to localhost, and the gateway’s rate limiter exempted localhost connections, so JavaScript on a web page could brute-force the gateway password and take over the agent.


What do the three worst CVEs reveal about MCP’s attack surface?

Three CVEs from early 2026 illustrate the full spectrum of what goes wrong.

CVE-2026-26118: Microsoft Azure MCP (SSRF, CVSS 8.8)

Microsoft patched this on March 10, 2026 during Patch Tuesday. Azure MCP Server tools accepted user-provided parameters as URLs without validation. An attacker supplied a malicious URL instead of a legitimate Azure resource identifier. The server sent an outbound request carrying its managed identity token. Attacker captured the token and used it to access other Azure resources under that service account (Blueinfy).

This is the canonical MCP SSRF pattern: the server trusts tool parameters, the parameters are attacker-influenced, and the server’s credentials travel with the request.

CVE-2026-25049: n8n sandbox escape (RCE, CVSS 9.4)

n8n is a widely used workflow automation platform that many teams use to wire up AI agents and MCP tools; it is not an MCP server itself. The vulnerability exploited a type confusion between TypeScript’s compile-time string enforcement and JavaScript’s runtime behavior. A sanitizer validated input types at compile time. Attackers passed non-string values at runtime using destructuring syntax, bypassing the sandbox entirely.

Impact: any user allowed to create or edit workflows could run system commands on the host running n8n (CVE record). On a shared instance that means full server compromise, theft of every credential n8n stores, and persistent backdoor installation. This CVE also bypassed the fix for CVE-2025-68613 (published December 2025), so the same expression sandbox fell twice in about two months.

The lesson: sandboxes built on language-level type assumptions fail when the runtime doesn’t enforce them. Most MCP servers are JavaScript or Python. Both have this gap between compile-time guarantees and runtime reality.

CVE-2026-27825 + CVE-2026-27826: mcp-atlassian (path traversal + SSRF to RCE)

Pluto Security discovered this in mcp-atlassian, a community MCP server for Jira and Confluence whose PyPI package is downloaded hundreds of thousands of times a month. Not an official Atlassian product, but widely deployed.

Two CVEs chained together. CVE-2026-27825 (CVSS 9.0) was an arbitrary file write via the confluence_download_attachment tool. Its download_path parameter was written to without confining it to a safe base directory, and the attacker can control the content too, through a Confluence attachment. Write to ~/.bashrc or ~/.ssh/authorized_keys, and you own the machine on next login.

CVE-2026-27826 (CVSS 8.2) was SSRF via unvalidated custom HTTP headers (X-Atlassian-Jira-Url, X-Atlassian-Confluence-Url) in the HTTP middleware. It needs no authentication, and in cloud deployments it can reach the instance metadata endpoint. Chained together, the two bugs turn network access to a server whose HTTP transport binds to 0.0.0.0 into code execution on the host.

Version 0.17.0 fixed both by confining file paths and validating URLs. Standard AppSec controls that should have existed from day one. Even then the SSRF fix was incomplete: a follow-up advisory (CVE-2026-77242, CVSS 7.5, fixed in v0.22.0) showed that DNS rebinding could get past the URL check, as the hardening section below explains.


Why are MCP servers the perfect SSRF target?

The root cause goes deeper than individual bugs. A February 2026 paper by Jiang et al. (arXiv 2602.19555, first posted as “Agentic AI as a Cybersecurity Attack Surface”) names the structural problem stochastic dependency resolution.

Traditional software has fixed build-time dependencies. You declare them in a manifest, pin versions, verify hashes. Agentic systems don’t work that way. They assemble execution context at runtime through probabilistic semantic decisions. The LLM reads a tool description, decides it matches the user’s intent, and calls it. No cryptographic binding ties what the agent thinks a tool does to what it actually does.

This means:

  • An agent’s effective permissions are unknown at deployment time. The LLM can discover and invoke tools that weren’t part of the original design.
  • Tool identity is semantic, not cryptographic. The agent picks tools by matching natural-language descriptions, which can be poisoned or spoofed.
  • MCP has no revocation mechanism for tools. If a tool is compromised, there’s no certificate to revoke and no protocol-level hash to invalidate.

Agentic systems resolve their dependencies probabilistically at runtime rather than deterministically at build time. The paper calls the attacker who exploits this a “Man-in-the-Environment” (MitE) adversary. This is the fundamental difference from traditional software supply chains, and it’s why standard dependency scanning tools miss the problem entirely.

For more on how data leakage compounds this risk, see Data leakage prevention.


What does the OWASP MCP Top 10 say?

OWASP’s MCP Top 10 is in beta (Phase 3 of its roadmap, beta release and pilot testing), with entries labelled 2025. It’s separate from both the LLM Top 10 and the Top 10 for Agentic Applications. The project lead is Vandana Verma Sehgal.

# Risk What it means
MCP01 Token mismanagement and secret exposure Static API keys, hardcoded credentials, tokens with excessive scope
MCP02 Privilege escalation via scope creep Tools gaining permissions beyond their declared scope at runtime
MCP03 Tool poisoning Malicious tool descriptions that manipulate agent behavior
MCP04 Supply chain attacks and dependency tampering Compromised MCP servers or skills injecting malicious code
MCP05 Command injection and execution Unsanitized inputs passed to shell commands or interpreters
MCP06 Prompt injection via contextual payloads Instructions hidden in tool inputs, outputs or retrieved content
MCP07 Insufficient authentication and authorization Missing or weak auth on MCP server endpoints
MCP08 Lack of audit and telemetry No logging of tool invocations, impossible incident response
MCP09 Shadow MCP servers Unauthorized MCP servers on the network that agents discover and use
MCP10 Context injection and over-sharing Agents leaking sensitive context to MCP servers that don’t need it

The three CVEs from the previous section map directly. Azure CVE-2026-26118 hits MCP01 (managed identity token exposed via SSRF). n8n CVE-2026-25049 hits MCP05 (command execution via sandbox escape). mcp-atlassian hits MCP07 (unauthenticated SSRF), MCP05 (file write to code execution) and MCP04 (a vulnerable community package in your supply chain). For tool poisoning, rug pulls and shadow servers (MCP03, MCP09), see MCP security beyond SSRF.

If your team adopts one thing from this list, make it MCP07. A server that accepts unauthenticated tool calls hands every other weakness on this list to anyone who can reach it. Fix that first.


How do you harden an MCP deployment?

A checklist drawn from OWASP’s Secure MCP Server Development Guide, NVIDIA’s sandboxing guidance, and the patches that fixed the three CVEs above.

Authentication (MCP01, MCP07)

Stop using static API keys. The state Astrix measured, 53% on static keys and 8.5% on OAuth, is not defensible.

# Illustrative MCP server config: OAuth 2.1 with scoped tokens
# (field names vary by server and framework)
auth:
  type: oauth2
  issuer: https://auth.yourcompany.com
  audience: mcp-server-prod
  scopes:
    - tools:read
    - tools:execute
  token_lifetime: 3600  # 1 hour max
  refresh: false  # no long-lived sessions

Use a credential broker that issues short-lived tokens per agent session. Never bake credentials into the MCP server image.

Input validation (MCP05, MCP06)

Every tool parameter that accepts a URL or file path needs validation. The mcp-atlassian v0.17.0 fix added both kinds of check. A simplified sketch of the pattern:

import ipaddress
import os
import socket
from urllib.parse import urlparse

ALLOWED_SCHEMES = {"https"}
BLOCKED_HOSTS = {"localhost", "metadata.google.internal"}


def validate_url_for_ssrf(url: str) -> bool:
    """Block SSRF via URL parameter injection.

    Resolves the hostname and rejects the URL if any address is not
    globally routable. Connect to the address you checked (or block
    egress at the network layer): otherwise DNS rebinding can change
    the answer between this check and the actual fetch.
    """
    parsed = urlparse(url)
    if parsed.scheme not in ALLOWED_SCHEMES or not parsed.hostname:
        return False
    if parsed.hostname.lower() in BLOCKED_HOSTS:
        return False
    try:
        port = parsed.port or 443
        infos = socket.getaddrinfo(parsed.hostname, port)
    except (ValueError, socket.gaierror):
        return False  # bad port or unresolvable host: reject
    for info in infos:
        ip = ipaddress.ip_address(info[4][0].split("%")[0])
        if ip.version == 6 and ip.ipv4_mapped:
            ip = ip.ipv4_mapped
        if not ip.is_global:  # private, loopback, link-local, metadata
            return False
    return True


def validate_safe_path(base_dir: str, requested_path: str) -> str:
    """Confine file operations to a safe base directory."""
    real_base = os.path.realpath(base_dir)
    real_path = os.path.realpath(os.path.join(real_base, requested_path))
    if os.path.commonpath([real_base, real_path]) != real_base:
        raise ValueError(f"Path traversal blocked: {requested_path}")
    return real_path

Two details matter. Resolve the hostname and check every address it returns, because attacker.example can point at 169.254.169.254. And compare paths with os.path.commonpath, not a string prefix: a prefix check lets /srv/data_evil pass for a base of /srv/data.

A check like this is still not enough on its own. mcp-atlassian’s v0.17.0 validator resolved the hostname and checked the addresses, but the HTTP library resolved the name again when it connected, so a DNS rebinding domain could answer with a public address during validation and 169.254.169.254 during the request (CVE-2026-77242, fixed in v0.22.0 by pinning the validated IP). Connect to the address you validated, re-check on every redirect, and back it with network-level egress rules.

Network isolation (SSRF class)

Run MCP servers in hardened containers with explicit egress rules:

# Docker Compose: MCP server with network restrictions
services:
  mcp-server:
    image: your-mcp-server:latest
    networks:
      - mcp-internal  # shared only with the agent container
    # no "ports:" mapping, so nothing is published on the host
    security_opt:
      - no-new-privileges:true
    read_only: true
    tmpfs:
      - /tmp
    environment:
      # illustrative name: use your server's origin allowlist setting
      - MCP_ALLOWED_ORIGINS=https://your-agent.internal

networks:
  mcp-internal:
    driver: bridge
    internal: true  # no external egress by default

If the server must reach an external API, route it through an egress proxy that allowlists that API’s hostname. If you run a server directly on a host instead of in a container, bind it to 127.0.0.1, never 0.0.0.0.

Block outbound requests to cloud metadata endpoints (169.254.169.254) at the network level as well as in the application, and use IMDSv2 on AWS. Application-level checks can be bypassed via DNS rebinding.

Audit logging (MCP08)

Log every tool invocation with parameters, caller identity, and timestamp. If you can’t reconstruct what your agent did last Tuesday, you can’t do incident response. For production observability patterns, see Observability and tracing.

Scanning

Tencent’s AI-Infra-Guard includes an LLM-agent-driven MCP scanner whose checks map to the ten OWASP MCP Top 10 categories, plus name confusion, rug pull and tool shadowing attacks. It can scan a server’s source directory or a running server. Run it against your MCP servers before deploying them.


Takeaways

  • 30+ CVEs in about 60 days, by community counts. MCP servers are web servers with cloud credentials and no security review process.
  • BlueRock flagged 36.7% of 7,000+ MCP servers for potential SSRF. Astrix found 53% rely on static API keys and only 8.5% use OAuth.
  • Stochastic dependency resolution means agents resolve tool dependencies probabilistically at runtime, creating an attack surface traditional dependency scanning misses.
  • The three CVEs (Azure SSRF, n8n sandbox escape, mcp-atlassian path traversal) are textbook AppSec failures repackaged in a new protocol context.
  • OWASP MCP Top 10 is the starting framework. Prioritize MCP07 (authentication) and MCP01 (credential management) first.
  • Harden with OAuth 2.1, URL/path validation, network isolation, audit logging, and container sandboxing.

Further reading