Summary
Hi @jasonmadigan, @david-martin , @mikenairn , @maleck13 , @Patryk-Stefanski
The MCP router (ext_proc) exposes an initialize-method code path that, when a
request carries an mcp-init-host header, bypasses the gateway JWT session
validator and rewrites the upstream :authority header to whatever the caller
chooses, gated only by a single shared header value (router-key). The shared
value is
- a literal string (
secret-api-key) baked into cmd/mcp-broker-router/main.go
as a fall-back default, and
- in controller-managed deployments, a SHA-256 truncation of the
MCPGatewayExtension UID — a non-secret value visible to anyone with get
permission on the resource, and additionally exposed in argv because it is
passed to the broker-router container via --mcp-router-key=....
A request that satisfies the trivial header check is forwarded to any backend
listener registered with the gateway (including external services such as
api.githubcopilot.com when configured), bypassing both the broker (where the
signed x-mcp-authorized capability filter is enforced) and the gateway's
JWT-based session model.
I have a fix ready locally and can push it to a private fork or open a private PR via the advisory.
Summary
Hi @jasonmadigan, @david-martin , @mikenairn , @maleck13 , @Patryk-Stefanski
The MCP router (ext_proc) exposes an
initialize-method code path that, when arequest carries an
mcp-init-hostheader, bypasses the gateway JWT sessionvalidator and rewrites the upstream
:authorityheader to whatever the callerchooses, gated only by a single shared header value (
router-key). The sharedvalue is
secret-api-key) baked intocmd/mcp-broker-router/main.goas a fall-back default, and
MCPGatewayExtensionUID — a non-secret value visible to anyone withgetpermission on the resource, and additionally exposed in
argvbecause it ispassed to the broker-router container via
--mcp-router-key=....A request that satisfies the trivial header check is forwarded to any backend
listener registered with the gateway (including external services such as
api.githubcopilot.comwhen configured), bypassing both the broker (where thesigned
x-mcp-authorizedcapability filter is enforced) and the gateway'sJWT-based session model.
I have a fix ready locally and can push it to a private fork or open a private PR via the advisory.