A critical authentication bypass in Docker’s MCP Gateway, tracked as CVE-2026-76092 (GHSA-g879-4j4f-6vj7), lets any network-adjacent client invoke every proxied Model Context Protocol server without credentials.
The flaw affects github.com/docker/mcp-gateway versions 0.25.0 and later, and it is fixed in 0.43.1. GitHub published the advisory on July 9.
The defect is a classic CWE-306 (Missing Authentication for Critical Functionality) failure in the gateway’s startup logic. In run.go, the bearer token is generated or loaded for network transports only when the process is not running inside a container. The check is gated on the DOCKER_MCP_IN_CONTAINER environment variable. The official image sets that variable, so the token stays empty in standard containerized deployments.
Docker MCP Gateway Flaw
The empty token then disables the middleware. In transport.go, the authentication middleware is attached to the /sse and /mcp handlers only when the token is non-empty. In container mode, both endpoints are therefore served as open routes. The gateway does not log a failure or refuse to start. It silently runs without access control.
The listener binds to all interfaces (0.0.0.0), which makes the missing middleware reachable beyond the local host. The only remaining control is originSecurityHandler, which is meant to block cross-origin browser requests.
It explicitly allows requests that carry no Origin header. Non-browser clients such as curl, scripts and MCP SDKs omit that header by default, so the check does not stop them.
Any peer that can reach the published port can therefore speak the MCP protocol directly to the gateway. That includes a LAN host and a neighboring container on the same Docker bridge network. The attacker needs no token, no session and no user interaction.
The gateway is a reverse proxy for multiple MCP servers. An attacker who reaches it can enumerate tools and invoke any of them. Many of those tools run with the operator’s stored secrets and OAuth tokens. These typically cover source-code hosting, cloud APIs, databases, ticketing systems and file stores.
Tool-call access effectively becomes confused-deputy abuse of the operator’s identity. An attacker could read repositories, query data stores, send messages or modify cloud resources.
This fits the CVSS v4 vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. It is network-exploitable with low complexity and needs no privileges or user interaction.
The attack requirement is present, and confidentiality, integrity and availability impacts on the vulnerable system are all high. Subsequent-system impact is scored none, but stolen tool credentials can still enable lateral movement.
Exploitation requires three conditions. The gateway must run in container mode, it must use an HTTP-based transport (SSE or streaming), and the port must be reachable by an untrusted host. Stdio transport deployments are not affected by the network path.
Risk rises with common practices. These include publishing port 8811 on a developer workstation, running shared Compose stacks on flat networks, and deploying agent infrastructure on cloud VMs with permissive security groups. Autonomous AI agent environments are especially exposed, because MCP gateways often hold high-privilege connectors by design.
Maintainers addressed the flaw in pull request #508, “Sec #2: Harden container gateway auth,” merged on June 17, 2026. The change requires bearer-token authentication for SSE and streaming transports even when DOCKER_MCP_IN_CONTAINER=1 is set. Startup now fails closed if an HTTP transport launches without a token.
An explicit –allow-unauthenticated flag is the only opt-out. If it is combined with an externally reachable listener, the gateway logs an uppercase warning that names the bind address and the tool-execution risk.
If the flag is set while MCP_GATEWAY_AUTH_TOKEN is present, the gateway logs that it is ignoring the token. A new test, TestHTTPTransportsRequireAuthToken, verifies that both SSE and streaming servers refuse to start with an empty token.
Reviewers noted this is a breaking change. Existing container deployments that ran without authentication will fail to start until operators set MCP_GATEWAY_AUTH_TOKEN or pass the opt-out flag. The default listener still binds to all interfaces for published-port and Compose compatibility, so operators should set –host explicitly where possible.
Mitigation
Defenders should upgrade to version 0.43.1 or later and supply a strong, unique MCP_GATEWAY_AUTH_TOKEN. Where patching is delayed, the advisory’s workarounds apply. Do not publish the gateway port to untrusted networks, and bind it to loopback or a trusted network only. Place the gateway behind an authenticating reverse proxy.
Teams should also rotate OAuth tokens and secrets that were available to proxied MCP servers on any exposed instance. They should review gateway and upstream API logs for unexpected tools/list and tools/call requests from unfamiliar source addresses. Network segmentation between agent containers and other workloads further limits lateral abuse.
Related coverage on cybersecurity news, critical CVE analysis and AI security threats is available on The Cyber Def.
FAQ
What is CVE-2026-76092? It is a critical CWE-306 missing-authentication flaw in Docker MCP Gateway that exposes the /sse and /mcp endpoints in container mode.
Which versions are affected and fixed? Versions 0.25.0 and later are affected, and version 0.43.1 contains the fix.
Can attackers exploit it remotely without credentials? Yes, any host that can reach the published port can do so with no privileges or user interaction.
How can administrators mitigate it? Upgrade to 0.43.1, set MCP_GATEWAY_AUTH_TOKEN, bind to loopback, or use an authenticating reverse proxy.
Sources
- GitHub Security Advisory GHSA-g879-4j4f-6vj7: https://github.com/advisories/GHSA-g879-4j4f-6vj7
- Docker MCP Gateway fix, pull request #508: docker/mcp-gateway#508
- MITRE CWE-306: https://cwe.mitre.org/data/definitions/306.html