fix(fetch): block private network URL fetches#4226
Conversation
PR modelcontextprotocol/servers#4226 by @kgarg2468 opened 2026-05-22, explicitly listing 'Fixes #4143' in the body. Commit summary: - Validate fetch URLs use http/https - Resolve only to public IP addresses - Block localhost, private, loopback, link-local, and metadata-service targets - Follow redirects manually so redirected targets are validated before each request The per-redirect validation step is more rigorous than the original disclosure asked for — closes a 302-bypass that the basic scheme/host check would have missed. 16/16 CI checks pass on the PR. Awaiting maintainer approval. Updated: - disclosures/2026-05-12-mcp-fetch-http-request-ssrf.md (status field + new Updates entry dated 2026-05-22) - findings/2026-05-11-MCP-D-003-fetch-direct-environment-dependent-ssrf.md (outcome line: 'demonstrated' → 'demonstrated + fix PR in review') - README.md findings table (fix PR link added) - CHANGELOG.md Unreleased section (disclosure-status entry) The community half (mcp-server-http-request) still has no maintainer response. Day +14 ping is due 2026-05-26 (4 days from now).
|
Thanks for picking this up so quickly, @kgarg2468 really appreciate it. |
Summary
Fixes #4143.
Tests