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

PACKAGE
Advisory Identifier: GHSA-r2xf-7jw5-pjg6
Advisory Summary

CVE-2026-55887 is a HIGH argument injection vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Docker MCP Gateway libraries in the Go ecosystem. The issue involves argument injection via oci image label yaml. Remediation is available by upgrading affected packages to version 0.42.2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

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

2 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-r2xf-7jw5-pjg6 CVE-2026-55887 HIGH Docker MCP Gateway: Argument injection via OCI image label YAML
GHSA-46gc-mwh4-cc5r CVE-2025-64443 HIGH Docker MCP Plugin and Docker MCP Gateway have DNS Rebinding vulnerability when running in sse or streaming mode

CVE-2026-55887 at a Glance

CVE Identifier CVE-2026-55887
GHSA Identifier GHSA-r2xf-7jw5-pjg6
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Docker MCP Gateway
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-55887

To remediate this vulnerability, upgrade all affected Docker 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/docker/mcp-gateway fixed: 0.42.2
Upgrade github.com/docker/mcp-gateway to 0.42.2
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/docker/mcp-gateway

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-55887, inspect your project dependencies for Docker MCP Gateway:

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

Analyze the terminal output to locate any version of Docker 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.42.2), 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-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Docker 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 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

CVE-2026-55887 Affected Docker MCP Gateway Versions

1 component(s)
Fixed Versions:
0.42.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/docker/mcp-gateway
Go
≥ 0.21.0
< 0.42.2
0.42.2

References

Frequently Asked Questions

What is CVE-2026-55887?
CVE-2026-55887 is a security vulnerability in Docker MCP Gateway involving Argument injection via OCI image label YAML under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Docker MCP Gateway versions are affected?
Affected versions include releases prior to 0.42.2 across affected packages: github.com/docker/mcp-gateway.
What version fixes CVE-2026-55887?
Upgrading to 0.42.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/docker/mcp-gateway affected?
Yes, github.com/docker/mcp-gateway is affected in releases prior to 0.42.2. Upgrade your dependency to 0.42.2 or later.
What CWE is associated with CVE-2026-55887?
CVE-2026-55887 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.).
How can I check Go dependencies for CVE-2026-55887?
Run the dependency tree command: 'inspect dependencies for github.com/docker/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-r2xf-7jw5-pjg6",
  "modified" : "2026-06-18T13:05:06Z",
  "published" : "2026-06-18T13:05:06Z",
  "aliases" : [ "CVE-2026-55887" ],
  "summary" : "Docker MCP Gateway: Argument injection via OCI image label YAML",
  "details" : "## 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",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/docker/mcp-gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.21.0"
      }, {
        "fixed" : "0.42.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/docker/mcp-gateway/security/advisories/GHSA-r2xf-7jw5-pjg6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/docker/mcp-gateway"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-88" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-18T13:05:06Z",
    "nvd_published_at" : null
  }
}