Skip to content

Prevent cross-server MCP authorization bypass through ambiguous names (VERIA-26) - #175

Draft
veria-ai[bot] wants to merge 4 commits into
mainfrom
veria/26-cross-server-mcp-authorization-bypass-th
Draft

veria-ai[bot] wants to merge 4 commits into
mainfrom
veria/26-cross-server-mcp-authorization-bypass-th

Conversation

@veria-ai

@veria-ai veria-ai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Security fix: Cross-Server MCP Authorization Bypass Through Ambiguous Names

What was wrong

MCP authorization in packages/core/src/tool-policy.ts matched flattened server and tool names, so a grant for docs could also authorize calls on docs_. packages/core/src/manifest.ts permitted trailing-underscore server names, and the broker and HTTP gateway used ambiguous qualified names for policy checks.

What changed

  • packages/core/src/tool-policy.ts added structured server/tool identities to allowsTool; 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, and packages/cli/src/cli.ts switched authorization checks to structured identities, including HTTP tool-list filtering and call enforcement.
  • packages/core/src/manifest.ts rejected server names ending in _, and broker discovery added rejection of duplicate qualified identities within a tool list or across servers.
  • Regression tests added coverage for colliding names, leading-underscore tool names, policy matching, discovery, listing, and call enforcement.

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.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot 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.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

rsnodgrass and others added 3 commits November 6, 2026 01:25
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant