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

> A malicious OCI image label can inject Docker run arguments, allowing arbitrary code execution on the host when the image is pulled or selected.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Sep 2026
- **Updated:** 15 Sep 2026
- **Also known as:** GHSA-r2xf-7jw5-pjg6, GO-2026-5604

## What is CVE-2026-55887?

CVE-2026-55887 is a high-severity command injection vulnerability in docker mcp-gateway, published on 15 Sep 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-88 (Improper Neutralization of Argument Delimiters in a Command)

## Which versions are affected by CVE-2026-55887?

3 open source packages ship an affected version, including github.com/docker/mcp-gateway.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/docker/mcp-gateway` | Go | From 0.21.0 | 0.42.2 |
| `github.com/docker/mcp-gateway` | Go | From 0.21.0 | 0.42.2 |
| `github.com/docker/mcp-gateway` | Go | From 0.21.0 | 0.42.2 |

## How do I fix CVE-2026-55887?

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

## Is CVE-2026-55887 being exploited?

There is no known exploitation of CVE-2026-55887 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55887 and fix it if it is affected.

What it is: CVE-2026-55887 is a high-severity command injection vulnerability in docker mcp-gateway, published on 15 Sep 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-55887 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/docker/mcp-gateway (Go): affected from 0.21.0; fixed in 0.42.2
- github.com/docker/mcp-gateway (Go): affected from 0.21.0; fixed in 0.42.2
- github.com/docker/mcp-gateway (Go): affected from 0.21.0; fixed in 0.42.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-55887/ (Markdown: https://insights.sbomify.com/CVE-2026-55887/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-55887
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-55887
- OSV: https://osv.dev/vulnerability/CVE-2026-55887

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-55887/
Summaries are generated and may contain mistakes; the official description above is the record.
