NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-55887: Docker MCP Gateway: Argument injection via OCI image label YAML

highCVSS 4.0 8.7GHSA-r2xf-7jw5-pjg6

Docker MCP Gateway (github.com/docker/mcp-gateway) 0.21.0 up to 0.42.2 reads container runtime settings from an OCI image label. A malicious image can inject volumes, a user and other flags into the `docker run` command that launches the MCP server, giving root code execution on the host. Upgrade to 0.42.2.

Published Jun 18, 2026 · Analysis Nov 2, 2026

What an attacker can do

The gateway reads the io.docker.server.metadata OCI image label and unmarshals the YAML directly into the wide catalog.Server struct. That struct holds descriptive fields and also runtime fields: Volumes, User, Command, ExtraHosts, AllowHosts, DisableNetwork, Env, Remote, SSEEndpoint, OAuth, Secrets, LongLived and Policy. Every runtime field has a YAML tag, so the label content fills them all. Only Image is overwritten afterwards. The launch code then appends the values verbatim as docker run flags such as -v, -u and --add-host, with no allowlist or origin check.

The attacker must control an image the victim references with docker://, or an image that the victim's catalog pulls a snapshot from. The CVSS vector marks user interaction as active, since the victim has to run that server.

Injected arguments such as -v /:/host, -u root and -v /var/run/docker.sock:/var/run/docker.sock give full host filesystem access and root execution. The gateway applies --security-opt no-new-privileges, but that does not help: the boundary is bypassed at container creation, so no in-container escalation is needed. For teams running AI agents, this means adding an untrusted MCP server image can hand the attacker the developer's machine or build host.

Who is affected

github.com/docker/mcp-gateway from 0.21.0 up to but not including 0.42.2. You are exposed if you launch MCP servers from images you do not control, through docker:// references or catalogs that pull snapshots. Check the module version:

go list -m github.com/docker/mcp-gateway

If you use the gateway binary or the Docker CLI plugin, check its version output instead.

github.com/docker/mcp-gateway

Ecosystem
Go
Affected
>= 0.21.0, < 0.42.2
Fixed in
0.42.2
Check
go list -m github.com/docker/mcp-gateway

How to fix it

Upgrade to github.com/docker/mcp-gateway 0.42.2.

go get github.com/docker/[email protected]

The patched parser fills only descriptive fields from the image label and ignores fields that control the container runtime, such as volumes, user and extra hosts. The advisory lists no workaround. Until you upgrade, use only MCP server images and catalogs you trust.

How to tell if you were hit

The advisory gives no detection steps. Review the docker run commands the gateway issued, and the config of running MCP server containers, for -v /:/host, -u root or -v /var/run/docker.sock:/var/run/docker.sock. Use docker inspect to check mounts and the user on those containers. Also inspect the io.docker.server.metadata label of images you pulled for runtime fields like Volumes or User. If a container with such mounts ran, treat the host as compromised.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A maliciously crafted OCI image label can inject arbitrary arguments into the docker run command line constructed by the MCP Gateway. An attacker who controls an image that the victim references via docker://, or that the victim's catalog pulls a snapshot from, can mount the host filesystem, run as UID 0, and execute arbitrary code on the host.

Details

The io.docker.server.metadata OCI image label is YAML-unmarshalled directly into the wide catalog.Server struct, which carries runtime-shaping fields (Volumes, User, Command, ExtraHosts, AllowHosts, DisableNetwork, Env, Remote, SSEEndpoint, OAuth,Secrets, LongLived, Policy) alongside descriptive fields. Every runtime field carries a YAML tag, so the unmarshal mass-assigns from the attacker-controlled label content; only Image is overwritten afterwards. The gateway's container-launch code then appends those fields verbatim as docker run flags (-v, -u, --add-host) with no allowlist or origin check, and execs docker with the resulting argv.

Impact

A malicious image author can achieve arbitrary code execution as UID 0 on the host of a victim running an affected version of MCP Gateway. Attacker-injected -v /:/host, -u root, and -v /var/run/docker.sock:/var/run/docker.sock arguments reach the docker run invocation that launches the MCP server container, giving the attacker full host filesystem access and root execution. The container/host trust boundary is bypassed at container-creation time, so the --security-opt no-new-privileges flag the gateway applies provides no protection: no in-container privilege escalation is needed.

Patches

The OCI image-label parser now only populates descriptive fields from the image label, which excludes fields that control the container runtime.

Credit

This issue was reported by Jabr Al-Otaibi @ DarkCov working with TrendAI Zero Day Initiative

Questions

What does an attacker need for CVE-2026-55887?

An image the victim runs through the gateway: one referenced with docker:// or pulled by a catalog snapshot. The victim must start that MCP server. The attacker needs no other access.

Does no-new-privileges stop it?

No. The gateway sets that flag, but the injected docker run arguments act at container creation, so no privilege escalation inside the container is needed.

Which version is fixed?

0.42.2. The affected range starts at 0.21.0, and the patched parser takes only descriptive fields from the image label.

Is it exploited in the wild?

No source I read says so, and the entry has no CISA KEV data. The reporter worked with the Zero Day Initiative.

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 entries