high
Broad host folder or Docker socket mounted into an MCP container
The container mounts /, a home folder or /var/run/docker.sock.
Why it matters
Mounting the Docker socket gives the server control of every container on the host, which is effectively root. Mounting a home folder exposes SSH keys and browser profiles.
How to fix it
Mount only the folder the server works on, read-only where possible (:ro).
Before
{
"mcpServers": {
"files": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"acme/mcp-files:2.0.1"
]
}
}
}After
{
"mcpServers": {
"files": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/home/alex/projects/site:/work:ro",
"acme/mcp-files:2.0.1"
]
}
}
}Illustrative configs. The checker flags the “before” version with this finding and not the “after” version.
Other checks
- Secret written into an MCP config
- Secret passed as a command-line argument
- Secret inside an MCP server URL
- Remote MCP server over unencrypted http
- Remote MCP server with no credentials configured
- Unpinned MCP server package or image
- MCP server installs without asking (npx -y)
- MCP server container runs --privileged
- MCP server container shares the host network
- MCP filesystem server with access to a very broad path
- MCP server launched through a shell
- MCP server that can run shell commands
- MCP tools auto-approved or always allowed