Name three more reserved ranges in the MCP endpoint blocklist - #112
Open
RenKoya1 wants to merge 1 commit into
Open
Name three more reserved ranges in the MCP endpoint blocklist#112RenKoya1 wants to merge 1 commit into
RenKoya1 wants to merge 1 commit into
Conversation
The connect-time blocklist is not the SSRF boundary -- workerd's global_fetch_strictly_public is -- but it is what tells a user typing a URL into the connect form why their host will not work. Three ranges of the same class as the entries already there were missing: 100.64.0.0/10 carrier-grade NAT fe80::/10 IPv6 link-local, where only fc00::/7 was covered :: the unspecified address, where only ::1 was covered Without them those hosts reach the fetch and fail as an opaque network error instead.
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLOCKED_HOST_PATTERNSinmcp-shared/src/endpoint.tsis explicitly not the SSRF boundary —global_fetch_strictly_publicis, and the file says so. What it is for is the other thing the comment names: giving a user typing a URL into the connect form a legible refusal instead of an opaque network error later. Three ranges of exactly the same class as the entries already listed were missing from it:100.64.0.0/10fe80::/10fc00::/7(f[cd]xx:) was covered::::1was coveredNothing else changes: the patterns keep the existing bracket-tolerant style, and
normalizeHostalready feeds them the canonical spelling.Verification
Added the new hosts to the existing blocked-hosts case, plus
100.63.0.1,100.128.0.1and[2606:4700::1111]to the accepted-hosts case so the new patterns are pinned on both sides of their boundaries. That test fails onmain(100.64.0.1: expected true to be false) and passes here.pnpm exec tsc --noEmitclean, fullmcp-sharedsuite 230/230, oxlint reports nothing new.