Repository navigation
Prevent cross-server MCP authorization bypass through ambiguous names (VERIA-26) - #175
Draft
veria-ai[bot] wants to merge 4 commits into
Draft
veria-ai[bot] wants to merge 4 commits into
veria-ai[bot] wants to merge 4 commits into
Conversation
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
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.
Security fix: Cross-Server MCP Authorization Bypass Through Ambiguous Names
What was wrong
MCP authorization in
packages/core/src/tool-policy.tsmatched flattened server and tool names, so a grant fordocscould also authorize calls ondocs_.packages/core/src/manifest.tspermitted trailing-underscore server names, and the broker and HTTP gateway used ambiguous qualified names for policy checks.What changed
packages/core/src/tool-policy.tsadded structured server/tool identities toallowsTool; whole-server rules now require an exact server match, and anchored tool globs match only the bare tool name.packages/core/src/mcp-broker.ts,packages/core/src/mcp-http.ts, andpackages/cli/src/cli.tsswitched authorization checks to structured identities, including HTTP tool-list filtering and call enforcement.packages/core/src/manifest.tsrejected server names ending in_, and broker discovery added rejection of duplicate qualified identities within a tool list or across servers.Why this is safe
Authorization now checks the actual server from the connection or endpoint configuration separately from the requested tool, so identical flattened names cannot transfer a grant between servers. Existing string callers remain supported, and valid unambiguous names retain their policy behavior, including broad deny rules. Trailing-underscore server names and duplicate qualified discovery identities are now rejected.
Before merging
Rename configured MCP servers whose names end in
_and update their policy rules.Fixes VERIA-26
This PR was generated by Veria AI.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.