Vulnerabilities in pkg:golang/github.com/Kuadrant/mcp-gateway

PACKAGE
Advisory Summary

GHSA-g53w-w6mj-hrpp is a CRITICAL authority-injection and jwt/session bypass vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting MCP Gateway libraries in the Go ecosystem. The issue involves authority-injection and jwt/session bypass via the unauthenticated router hair-pin "router-key" / "mcp-init-host" path. Remediation is available by upgrading affected packages to version 0.7.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/Kuadrant/mcp-gateway

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/Kuadrant/mcp-gateway. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g53w-w6mj-hrpp - CRITICAL MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin "router-key" / "mcp-init-host" path

GHSA-g53w-w6mj-hrpp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-g53w-w6mj-hrpp
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product MCP Gateway
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-g53w-w6mj-hrpp

To remediate this vulnerability, upgrade all affected MCP Gateway dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/Kuadrant/mcp-gateway fixed: 0.7.0
Upgrade github.com/Kuadrant/mcp-gateway to 0.7.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/Kuadrant/mcp-gateway

How to Check if You Are Affected

To determine whether your application is affected by GHSA-g53w-w6mj-hrpp, inspect your project dependencies for MCP Gateway:

inspect dependencies for github.com/Kuadrant/mcp-gateway

Analyze the terminal output to locate any version of MCP Gateway in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In MCP Gateway, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

GHSA-g53w-w6mj-hrpp Affected MCP Gateway Versions

1 component(s)
Fixed Versions:
0.7.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/Kuadrant/mcp-gateway
Go
< 0.7.0
0.7.0

References

Frequently Asked Questions

What is GHSA-g53w-w6mj-hrpp?
GHSA-g53w-w6mj-hrpp is a security vulnerability in MCP Gateway involving Authority-injection and JWT/session bypass via the unauthenticated router hair-pin "router-key" / "mcp-init-host" path under CWE-639: Authorization Bypass Through User-Controlled Key.
Which MCP Gateway versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: github.com/Kuadrant/mcp-gateway.
What version fixes GHSA-g53w-w6mj-hrpp?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/Kuadrant/mcp-gateway affected?
Yes, github.com/Kuadrant/mcp-gateway is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What CWE is associated with GHSA-g53w-w6mj-hrpp?
GHSA-g53w-w6mj-hrpp is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Go dependencies for GHSA-g53w-w6mj-hrpp?
Run the dependency tree command: 'inspect dependencies for github.com/Kuadrant/mcp-gateway'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g53w-w6mj-hrpp",
  "modified" : "2026-07-21T14:42:27Z",
  "published" : "2026-05-19T19:42:46Z",
  "aliases" : [ ],
  "summary" : "MCP Gateway: Authority-injection and JWT/session bypass via the unauthenticated router hair-pin \"router-key\" / \"mcp-init-host\" path",
  "details" : "## Summary\n \nThe MCP router (ext_proc) exposes an `initialize`-method code path that, when a\nrequest carries an `mcp-init-host` header, bypasses the gateway JWT session\nvalidator and rewrites the upstream `:authority` header to whatever the caller\nchooses, gated only by a single shared header value (`router-key`). The shared\nvalue is\n\n* a literal string (`secret-api-key`) baked into `cmd/mcp-broker-router/main.go`\n  as a fall-back default, and\n* in controller-managed deployments, a SHA-256 truncation of the\n  `MCPGatewayExtension` UID — a non-secret value visible to anyone with `get`\n  permission on the resource, and additionally exposed in `argv` because it is\n  passed to the broker-router container via `--mcp-router-key=...`.\n\nA request that satisfies the trivial header check is forwarded to any backend\nlistener registered with the gateway (including external services such as\n`api.githubcopilot.com` when configured), bypassing both the broker (where the\nsigned `x-mcp-authorized` capability filter is enforced) and the gateway's\nJWT-based session model.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/Kuadrant/mcp-gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Kuadrant/mcp-gateway/security/advisories/GHSA-g53w-w6mj-hrpp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Kuadrant/mcp-gateway/commit/6052079283472aff99727058c92618178f86b2d7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Kuadrant/mcp-gateway"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Kuadrant/mcp-gateway/releases/tag/v0.7.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-346", "CWE-639" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T19:42:46Z",
    "nvd_published_at" : null
  }
}