Docker mcp-gateway
MCP Gateway: Argument injection via OCI image label YAML in Docker MCP Gateway
MCP Gateway allows easy and secure running and deployment of MCP servers. From 0.21.0 until 0.42.2, Docker MCP Gateway YAML-unmarshalled the attacker-controlled io.docker.server.metadata OCI image label into the broad catalog.Server structure for direct docker:// references and catalog snapshot imports in pkg/oci/self_contained.go and pkg/workingset/workingset.go. Runtime-shaping fields including Volumes, User, and ExtraHosts were then appended to the docker run argument vector without an origin allowlist, allowing a malicious image author to request host filesystem or Docker socket mounts and UID 0 execution when a victim selected or pulled the image. This container-creation-time boundary bypass can execute arbitrary code on the host and is not prevented by no-new-privileges because no in-container privilege escalation is required. This issue is fixed in version 0.42.2.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.21.0, < 0.42.2
Fixed in 0.42.2
Mitigation
Upgrade mcp-gateway to 0.42.2 or later.
References
- Vendor advisory github.com/docker/mcp-gateway/security/advisor…
- Patch github.com/docker/mcp-gateway/pull/498
- Patch github.com/docker/mcp-gateway/commit/306d2d94a…
2 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.