{"id":"CVE-2026-55887","aliases":["CVE-2026-55887","GHSA-r2xf-7jw5-pjg6","GO-2026-5604"],"related":[],"kind":"vulnerability","state":"published","title":"MCP Gateway: Argument injection via OCI image label YAML in Docker MCP Gateway","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA 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.\n  \n## Details\n\n 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.\n\n## Impact\n  \nA 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.\n\n## Patches\nThe OCI image-label parser now only populates descriptive fields from the image label, which excludes fields that control the container runtime.\n\n## Credit\n\nThis issue was reported by Jabr Al-Otaibi `@ DarkCov` working with TrendAI Zero Day Initiative","format":"markdown","source":"ghsa"},{"lang":"en","text":"Docker MCP Gateway: Argument injection via OCI image label YAML in github.com/docker/mcp-gateway","format":"markdown","source":"go"}],"published":"2026-06-18T13:05:06.000Z","modified":"2026-09-30T17:51:56.193Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"HIGH"}],"cwes":["CWE-88"],"affected":[{"ranges":[{"version":">= 0.21.0, < 0.42.2","status":"affected"}],"vendor":"docker","product":"mcp-gateway","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.21.0","status":"affected","fixed":"0.42.2"}],"ecosystem":"Go","package":"github.com/docker/mcp-gateway","purl":"pkg:golang/github.com/docker/mcp-gateway","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.21.0","status":"affected","fixed":"0.42.2"}],"ecosystem":"Go","package":"github.com/docker/mcp-gateway","purl":"pkg:golang/github.com/docker/mcp-gateway","source":"go"}],"references":[{"url":"https://github.com/docker/mcp-gateway/security/advisories/GHSA-r2xf-7jw5-pjg6","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/docker/mcp-gateway/pull/498","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/docker/mcp-gateway/commit/306d2d94a3b526f43281313321bf784f2d46a7fe","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/docker/mcp-gateway/commit/439b2200d9e26a4ff414aeb043785df45a78422b","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/docker/mcp-gateway/releases/tag/v0.42.2","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/docker/mcp-gateway","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-09-15T17:45:43.530Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55887","url":"https://www.cve.org/CVERecord?id=CVE-2026-55887","licence":"CVE Terms of Use","modified":"2026-09-15T18:02:09.186Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r2xf-7jw5-pjg6","url":"https://github.com/advisories/GHSA-r2xf-7jw5-pjg6","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:30.259Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5604","url":"https://pkg.go.dev/vuln/GO-2026-5604","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:35.593Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55887","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55887","licence":"Public domain","modified":"2026-09-30T17:51:56.193Z"}],"updatedAt":"2026-11-25T22:59:38.560Z","epss":{"score":0.00199,"percentile":0.10205,"date":"2026-12-01T12:00:22.000Z"}}