UTC
Low

robots.txt enforcement bypass via HTTP redirects in mcp-server-fetch

GHSA-3jqg-r5pp-rmp2 · published 2026-10-25

Severity
Low
CVSS score
3.1
Chance of exploitation (EPSS)
No CVE
Fixed in
2026.10.24
What it is

Anyone running mcp-server-fetch with robots.txt enforcement on (the default), for fetches the model makes through the fetch tool. The fetch prompt skips robots.txt by design and is not affected. The attacker needs a URL the model will fetch and that the robots.txt check lets through: a page they host on a host with no robots.txt or a permissive one, answering with a redirect. A site can also trip it without any attacker, with an ordinary redirect from an allowed path to a disallowed one. In both cases the final URL is never checked against the robots.txt of the host it ends up on. …

What to do

Upgrade mcp-server-fetch to 2026.10.24 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Check robots.txt in a second request hook, for every request after the first (the handler has already checked the first one), and only when the caller asked for robots.txt enforcement: The fetch prompt and --ignore-robots-txt don't pass the flag, so they behave as before. Behaviour change to be aware of: one extra robots.txt request per redirect hop, same-host hops included (I didn't add caching, to keep the diff small), and a redirect target whose robots.txt can't be fetched or answers 401/403 now fails the fetch, the same way it already does for the requested URL. The full patch also adds four tests to tests/test_protocol.py and changes the assertion quoted above. …

Affected
PackageRegistryAffectedFixed in
mcp-server-fetchPyPI>= 0.6.1, <= 2026.10.192026.10.24

The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].