Skip to main content
Vulnerability Database/CVE-2026-104120

CVE-2026-104120: MCP Server Fetch SSRF Vulnerability

CVE-2026-104120 is a server-side request forgery flaw in modelcontextprotocol mcp-server-fetch that allows attackers to manipulate URL parameters. This post covers technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104120 Overview

CVE-2026-104120 is a Server-Side Request Forgery (SSRF) vulnerability [CWE-918] affecting the modelcontextprotocolmcp-server-fetch and mcp-server-everything packages through version 2026.6.4. The flaw resides in the fetch_url function within mcp_server_fetch/server.py, part of the Fetch Tool component. Attackers can manipulate the url/path argument to coerce the server into issuing arbitrary HTTP requests to internal or restricted resources. The attack is remotely initiated and requires no authentication. A public exploit disclosure exists, and a pull request addressing the issue is pending acceptance upstream.

Critical Impact

Remote, unauthenticated attackers can abuse the Model Context Protocol (MCP) fetch tool to pivot into internal networks, probe cloud metadata services, and access resources otherwise unreachable from the public internet.

Affected Products

  • modelcontextprotocol/mcp-server-fetch up to and including 2026.6.4
  • modelcontextprotocol/mcp-server-everything up to and including 2026.6.4
  • Deployments embedding the fetch_url function from mcp_server_fetch/server.py

Discovery Timeline

  • 2026-10-02 - CVE-2026-104120 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-104120

Vulnerability Analysis

The vulnerability stems from insufficient validation of user-supplied URLs passed to the fetch_url function in mcp_server_fetch/server.py. The Fetch Tool is designed to retrieve remote web content on behalf of a Model Context Protocol client, typically a large language model agent. Because the server performs the outbound request from its own network position, an attacker who controls the url or path parameter can direct the request to arbitrary targets.

This class of flaw [CWE-918] enables access to resources that are reachable from the server but not from the attacker. In MCP deployments, the fetch server often runs alongside other infrastructure, which widens the blast radius. The exploit has been publicly disclosed according to VulDB, increasing the likelihood of opportunistic abuse.

Root Cause

The root cause is the absence of a strict allowlist and address-family filter inside fetch_url before the outbound HTTP request is dispatched. The function accepts URLs without rejecting private IPv4 ranges, IPv6 loopback and unique-local addresses, link-local metadata endpoints such as 169.254.169.254, or non-HTTP(S) schemes. DNS rebinding is also not mitigated.

Attack Vector

A remote attacker who can submit prompts or tool arguments to an MCP client sends a crafted URL that targets an internal service. The fetch server resolves and requests the URL, then returns the response body to the caller. The vulnerability requires no privileges and no user interaction beyond normal tool invocation. See the GitHub Issue #4492 and proposed fix in Pull Request #4890 for technical specifics.

// No verified exploit code is published. Refer to the upstream advisory for details.

Detection Methods for CVE-2026-104120

Indicators of Compromise

  • Outbound HTTP requests from the MCP fetch server to RFC1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that do not match normal application behavior.
  • Requests from the fetch server process to cloud metadata endpoints such as 169.254.169.254 or metadata.google.internal.
  • Unusual tool invocations where the url argument contains loopback (127.0.0.1, [::1]) or non-HTTP schemes (file://, gopher://).

Detection Strategies

  • Instrument mcp_server_fetch/server.py with structured logging that records the resolved IP address for every fetch_url call.
  • Correlate MCP tool-call logs with egress firewall logs to identify fetches destined for internal subnets.
  • Alert on repeated 4xx/5xx responses to internal hosts, which often indicate SSRF probing.

Monitoring Recommendations

  • Forward MCP server logs, egress proxy logs, and cloud metadata access logs into a centralized analytics pipeline for correlation.
  • Baseline normal destination domains for the fetch tool and alert on first-seen internal destinations.
  • Monitor for sudden spikes in fetch tool invocation volume from a single MCP session.

How to Mitigate CVE-2026-104120

Immediate Actions Required

  • Restrict egress from hosts running mcp-server-fetch to an explicit allowlist of required external domains.
  • Block the fetch server at the network layer from reaching RFC1918, link-local, and cloud metadata address ranges.
  • Review tool-call logs for prior exploitation attempts targeting internal URLs.

Patch Information

At the time of NVD publication, the upstream fix is tracked in Pull Request #4890 and awaits acceptance. Operators should monitor the modelcontextprotocol/servers repository and apply the released version once merged. Additional vulnerability metadata is available at VulDB CVE-2026-104120.

Workarounds

  • Deploy an outbound HTTP proxy that enforces a domain allowlist for all MCP fetch requests.
  • Wrap the fetch_url function with pre-request validation that rejects private, loopback, link-local, and multicast addresses after DNS resolution.
  • Run the MCP fetch server in a network namespace or container with no route to internal management networks or cloud metadata services.
bash
# Example egress restriction using iptables to block cloud metadata and RFC1918 destinations
iptables -A OUTPUT -m owner --uid-owner mcp -d 169.254.169.254 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mcp -d 10.0.0.0/8 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mcp -d 172.16.0.0/12 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mcp -d 192.168.0.0/16 -j REJECT

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.