Skip to content

[SECURITY] MCP server over SSE/HTTP has no authentication and lets any caller overwrite org credentials #116

Closed

Description

@OkiriGabriel

Problem

devops-agent mcp --transport sse (or streamable-http) serves every MCP tool over the network with no authentication (devops_mcp/server.py, devops_mcp/registry.py). The default bind address is 127.0.0.1, but containers and the documented examples commonly set --host 0.0.0.0/FASTMCP_HOST.

Anyone who can reach the port can:

  • Overwrite an org's credentials: configure_org_credentials calls org_config.save(org, credentials) for any org_id. An attacker can swap in their own GITHUB_TOKEN, kubeconfig, ANTHROPIC_API_KEY or SLACK_WEBHOOK_URL, redirecting the agent's actions and exfiltrating every future incident report.
  • Call every AGENT_TOOLS entry: read pod logs, CI logs, Loki and cloud resources, run safe-classified shell commands, and, with AUTO_APPLY=true, apply changes.
  • Enqueue incidents and read audit logs for any org.

Expected

Network MCP transports refuse to start without authentication, and every request is authenticated and bound to an org.

Suggested fix

  1. Require a bearer token (MCP_AUTH_TOKEN, or per-org tokens) for sse/streamable-http. Refuse to start on a non-loopback host without one.
  2. Bind the token to an org. Ignore or reject a caller-supplied org_id that doesn't match.
  3. Drop configure_org_credentials from network transports, or put it behind a separate admin token.
  4. Tests: unauthenticated request gets 401; wrong-org org_id is rejected; server refuses --host 0.0.0.0 without a token.

Related: #59 (the same gap on the HTTP API), #61.

Activity

  1. added
    bug
    security
    on Oct 24, 2026
  2. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions