mcp-server-fetch: robots.txt path-canonicalization bypass (e.g. //private fetched while Disallow: /private)
GHSA-f9hh-cmx9-2f23 · published 2026-11-11
- Severity
- Low
- CVSS score
- 3.1
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.11
Autonomous (model-initiated) fetch with robots enforcement on (default); the intentional prompt-fetch robots exemption is out of scope. Attacker influences a URL the agent fetches (directly or via redirect). Target publishes a path-specific Disallow, and its origin resolves the alternate spelling to that resource.
Upgrade mcp-server-fetch to 2026.11.11 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.
Resolve the request path the way an origin does before matching rules, and require both the literal spelling and the resolved path to be allowed (and). Decode only separator/dot escapes (%2f/%2F/%2e/%2E), collapse duplicate slashes, and remove ./.. per RFC 3986 §5.2.4; leave ordinary escapes such as %20 alone. Derive the wire path with urlsplit/urlunsplit rather than from a URL object that HTTPX/Pydantic may already have normalized. Keep the existing can_fetch(str(url), …) check and add the second check — the change only ever adds refusals. Happy to share a tested patch + regression file against the project's harness privately if useful. …
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-fetch | PyPI | >= 0.6.1, < 2026.11.11 | 2026.11.11 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- Criticalgit_add runs submodule filter commands when gitlink mode is not 160000mcp-server-git
- Criticalmcp-server-git: unexpandable sparse index lets submodule filter drivers runmcp-server-git
- Mediumfetch: small page OOMs the server during HTML-to-Markdown conversionmcp-server-fetch
- Mediumfetch: robots.txt User-agent groups cause quadratic memory blowupmcp-server-fetch
- Mediumfetch: private-address guard bypass via IDNA hostnames (check and connect resolve different names)mcp-server-fetch
- Lowfetch: robots.txt is ignored when it starts with a UTF-8 BOMmcp-server-fetch
- Lowfetch: punycode charset in Content-Type hangs the server for 16 minmcp-server-fetch
- LowIncomplete fix for GHSA-3rxj-6jhw-qfv7: robots.txt path normalisation in mcp-server-fetch still misses backslash and path-parameter spellingmcp-server-fetch
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.