EX-010: This tool server is not locked to a version

This tool server is not locked to a version

Infection level: MEDIUMEX-010 · Unpinned MCP server

What the attacker is trying to do

Without a version, every run fetches the latest release. If an attacker publishes a bad update, your agent starts running it automatically.

Defanged example

From fixtures/haunted-repo/EX-010-unpinned-mcp-server.json. Hidden characters are shown as [U+XXXX]. Nothing here can run: domains use example.invalid and secrets are placeholders.

{
  "_comment": "DEFANGED — EX-010: Unpinned MCP server",
  "_attack": "The MCP server is referenced with npx and no version pin. A supply-chain attacker who publishes a newer malicious version will get it run automatically.",
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-filesystem", "/home/user/projects"],
      "autoApprove": ["read_file"]
    },
    "github": {
      "command": "npx",
      "args": ["mcp-server-github"],
      "env": {
        "GITHUB_TOKEN": "EXAMPLE_TOKEN_DO_NOT_USE"
      }
    }
  }
}

How to fix it

Pin every MCP server to an exact version: replace `npx some-server` with `npx some-server@1.2.3`. Verify the pinned version with a lockfile or a hash check in CI.

Technical details

Detected by
a structure check on JSON files
Checks files of type
mcp-config, config
OWASP
ASI07 Supply Chain Vulnerabilities; MCP04 Malicious MCP Package