---
title: "GHSA-g53w-w6mj-hrpp: MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin \"router-key\" / \"mcp-init-host\" path"
url: https://erroneo.us/security/ghsa/GHSA-g53w-w6mj-hrpp/
description: "GHSA-g53w-w6mj-hrpp (critical, Go): MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin \"router-key\" /…"
type: advisory
section: "Security Digest"
date_published: 2026-05-19
date_modified: 2026-07-21
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-g53w-w6mj-hrpp"
license: All rights reserved. Quote with attribution and a link.
---

# GHSA-g53w-w6mj-hrpp: MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin "router-key" / "mcp-init-host" path

## Affected packages

- Go `github.com/Kuadrant/mcp-gateway` < 0.7.0 → fixed: 0.7.0

## Details

Summary The MCP router (extproc) 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.

## Sources

- [GitHub Advisory GHSA-g53w-w6mj-hrpp](https://github.com/advisories/GHSA-g53w-w6mj-hrpp)
- [github.com](https://github.com/Kuadrant/mcp-gateway/security/advisories/GHSA-g53w-w6mj-hrpp)
- [github.com](https://github.com/Kuadrant/mcp-gateway/commit/6052079283472aff99727058c92618178f86b2d7)
- [github.com](https://github.com/Kuadrant/mcp-gateway/releases/tag/v0.7.0)

---
Source page: https://erroneo.us/security/ghsa/GHSA-g53w-w6mj-hrpp/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
