GHSA-g53w-w6mj-hrpp: MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin "router-key" / "mcp-init-host" path
Kuadrant MCP Gateway before 0.7.0 lets an unauthenticated caller skip its JWT session check and steer requests to any backend registered with the gateway. A request with an mcp-init-host header and a guessable router-key header is trusted by the router. Upgrade github.com/Kuadrant/mcp-gateway to 0.7.0.
Published May 19, 2026 · Updated Jul 21, 2026 · Analysis Oct 27, 2026
What an attacker can do
The MCP router (ext_proc) has an initialize code path meant for its own internal hair-pin request. When a request carries an mcp-init-host header, the router skips the gateway's JWT session validator and rewrites the upstream :authority header to the value the caller chose. The only gate is a shared value in the router-key header.
That value is weak in both setups. The code in cmd/mcp-broker-router/main.go falls back to the literal string secret-api-key. In controller-managed deployments it is a SHA-256 truncation of the MCPGatewayExtension UID. Anyone with get access on that resource can read it, and it also shows in the container's argv through the --mcp-router-key=... flag.
A client that sends the header pair gets forwarded to any backend listener registered with the gateway, including external services such as api.githubcopilot.com if configured. This skips the broker, where the signed x-mcp-authorized capability filter is enforced, and skips the session model. For teams that put the gateway in front of MCP servers used by agents, this means an unauthenticated network caller can reach tools and upstream credentials that policy was meant to restrict. The CVSS 4.0 score is 9.3 with no privileges and no user interaction.
Who is affected
Go module github.com/Kuadrant/mcp-gateway at versions below 0.7.0. Both default installs (the hardcoded fallback) and operator-managed installs (the UID-derived key) are affected. Check the module version in a Go project:
go list -m github.com/Kuadrant/mcp-gatewayFor a cluster deployment, check the image tag of the broker-router container, and look for --mcp-router-key in its args:
kubectl get deploy -A -o yaml | grep -n mcp-router-keygithub.com/Kuadrant/mcp-gateway
- Ecosystem
- Go
- Affected
- < 0.7.0
- Fixed in
- 0.7.0
- Check
go list -m github.com/Kuadrant/mcp-gateway
How to fix it
Upgrade to 0.7.0. The fix commit removes the --mcp-router-key flag and the MCP_ROUTER_API_KEY environment variable, and removes the routerKey() helper that derived a key from the UID. The hair-pin initialize request now carries a short-lived JWT in the router-key header, valid for 30 seconds, with issuer mcp-gateway, audience mcp-router, purpose backend-init, bound to the host. The router validates it before honoring an mcp-init-host rewrite, and fails closed if no token manager is configured. The controller also adds an HTTPRoute filter that strips mcp-init-host and router-key from client requests.
The release notes say the broker/router panics on startup if JWT_SESSION_SIGNING_KEY is empty, so set it before upgrading. The sources give no workaround for older versions.
How to tell if you were hit
Look in gateway and Envoy access logs for client requests that carry mcp-init-host or router-key headers. Real clients never send them. Look for requests to initialize that reached backends without a session JWT, and for upstream :authority values you do not expect, such as external hosts. Check who has get access to MCPGatewayExtension resources, and treat the derived key as exposed to them. Because the key also appears in argv, anyone able to list processes or pod specs could read it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
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 intocmd/mcp-broker-router/main.goas a fall-back default, and - in controller-managed deployments, a SHA-256 truncation of the
MCPGatewayExtensionUID — a non-secret value visible to anyone withgetpermission on the resource, and additionally exposed inargvbecause 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.
Credited to Bhuvanesh66.
Questions
- Does GHSA-g53w-w6mj-hrpp need authentication?
No. The router trusts a request with an
mcp-init-hostheader plus the sharedrouter-keyvalue, and that value is either the hardcodedsecret-api-keydefault or derived from a resource UID that others can read.- Which version fixes it?
0.7.0. It replaces the static key with a 30-second signed JWT and strips the internal headers from client requests.
- Can I just change the router key as a workaround?
The sources do not offer this. In controller-managed setups the key is derived from the extension UID, so you cannot set your own, and the 0.7.0 fix removes the flag entirely. Upgrade.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-129235
Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path
medium5.3Nov 16, 2026CVE-2026-129236
Kubeshark: MCP `start_kubeshark` argument injection via `pod_regex` → image redirect → cluster takeover
high7.2Nov 16, 2026CVE-2026-68934
code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parameters
high8.7Nov 16, 2026CVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026
