Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 10 min read Opinion mediumAdept

MCP Horror Stories: The Security Issues Threatening AI Infrastructure

MCP servers expose AI agents to six recurring vulnerability classes: OAuth discovery flaws (e.g. CVE-2025-6514 in mcp-remote), command injection (reported in 43% of analyzed servers), unrestricted network fetches (33%), file path leakage (22%), tool poisoning (5.5%) and plaintext secret exposure. Each class comes with checks to apply before installing a server, such as avoiding servers that build shell commands from input or take credentials as environment variables. Docker's MCP Gateway is presented as the mitigation, running each server in a container with no-new-privileges, CPU and memory limits, signature verification, L7 network allowlisting via --block-network, secret scanning via --block-secrets and call logging.

Assumes: Model Context Protocol basicsDocker containersOAuth flows

Related posts

  • MCP Security: A Developer’s Guide

    Docker easyNovice

    MCP servers expand what AI agents can do but introduce risks across four categories: misconfigurations and weak defaults, malicious or compromised servers, secret leakage, and prompt injection or tool poisoning. One cited analysis found command injection flaws in 43% of MCP servers examined. Static AppSec tools miss these risks because agent behavior is non-deterministic and models can treat tool descriptions as instructions. The recommended guardrails are to containerize each server with resource and egress limits, route calls through a policy gateway that verifies signatures, enforces allowlists, redacts secrets, runs pre- and post-call interceptors and logs every call, and pin vetted servers by digest. Docker positions its MCP Gateway and MCP Catalog & Toolkit as the implementation.

  • Securing Model Context Protocol: Safer Agentic AI with Containers

    Docker easyNovice

    Running MCP servers via npx on the host with plaintext environment-variable secrets leaves agentic tooling exposed to supply-chain tampering, credential leakage, and attacks such as rug pulls, tool shadowing, and tool poisoning. Containers address part of this through isolation, reproducibility, and verifiable provenance. They should be paired with scoped secret injection, a single MCP Gateway that screens all server-to-client traffic, and separate policies for which servers are trusted versus which a given agent needs. Tool annotations like readOnlyHint and destructiveHint can be enforced at container runtime, and Docker's MCP Catalog and Toolkit package these ideas behind one socat-over-STDIO connection.

  • Docker MCP Gateway: Open Source, Secure Infrastructure for Agentic AI

    Docker mediumAdept

    Docker's MCP Gateway, now open source, is a single enforcement point between AI agents and the MCP servers they call, aggregating multiple containerized servers behind one interface and integrating with Docker Compose. The `docker mcp` CLI covers browsing the catalog, storing secrets such as API keys, writing per-server host config, and running gateways that expose chosen servers and a restricted set of tools over transports like SSE. Security interceptors can be switched on at startup to verify container image signatures, block secret-like content in payloads, and log tool calls. It ships in Docker Desktop and works with any community edition of Docker.

  • MCP Horror Stories: The Supply Chain Attack

    Docker mediumAdept

    CVE-2025-6514 (CVSS 9.6) in mcp-remote, an OAuth proxy downloaded over 437,000 times, let a malicious MCP server achieve remote code execution on developer machines. mcp-remote passed the server-supplied authorization_endpoint unvalidated to the npm 'open' package. On Windows that runs PowerShell, and an 'a:' scheme prefix keeps a $() subexpression from being URL-encoded, so the embedded command executes. Docker pitches its MCP Toolkit as the fix: native OAuth handling in place of the proxy, plus containerized servers with signature verification, network allowlisting, secret blocking and resource limits. It concedes that containerization alone would not have stopped this host-side bug.

  • MCP Horror Stories: The GitHub Prompt Injection Data Heist

    Docker mediumAdept

    A prompt injection planted in a public GitHub issue can hijack an AI agent using the official GitHub MCP server. When a developer asks it to "check the open issues," the agent uses a broad personal access token to read private repositories and leak salary and project data into a public pull request, as Invariant Labs demonstrated in May 2025. Docker's mitigation runs tools through the Docker MCP Gateway with interceptors, which are exec, container or HTTP hooks that inspect each tool call before and after it runs. A cross-repo-blocker script locks each session to the first repository accessed and blocks calls to any other repository. A Docker Compose setup with audit logging and repository-scoped OAuth is included as defense-in-depth against credential overreach.

The quest for software engineering knowledge.

Look:
Layout: