
Attack scenario 1: Malicious code and credential theft via supply chain
Attack scenario 2: Over-privileged credentials enable lateral movement
Attack scenario 3: Prompt injection triggers unauthorized database operations
Attack scenario 4: Exposed Remote MCP Servers with no authentication
Attack scenario 5: Credential leakage through logs and crash dumps
Detecting MCP security incidents
A compromised MCP server is dangerous. An over-privileged compromised MCP server is catastrophic.
A team deploys a GitHub MCP server to help developers search for code and manage issues. The server needs read access to repositories and the ability to create and update issues. Instead of creating a fine-grained personal access token scoped to repo:read and issues:write, the team uses a classic GitHub PAT with full repo scope, which grants read and write access to every repository in the organization, including private ones that contain infrastructure-as-code definitions, secrets configuration, and deployment scripts.
An attacker who compromises this MCP server via any of the other vectors described in this article now has write access to every repository in the organization. They can modify CI/CD pipeline configurations, inject malicious code into deployment workflows, or access credentials stored in private repositories.
The attack works because the credential has far more permissions than the MCP server actually needs. The following diagram illustrates the gap between required and granted permissions.

This over-provisioning is endemic to MCP deployments. Astrix Security's research found that 53% of MCP servers rely on static API keys or personal access tokens, and these tokens are rarely scoped to the minimum required permissions because fine-grained scoping requires more setup effort.
A related risk is the confused deputy problem. If the MCP server uses a global service token instead of a user-scoped credential, it may have permissions the user does not. The AI can then trigger actions using the server's privileges rather than the user's, effectively performing operations the user was never authorized to execute.
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.
