Skip to Content
RelayCase studiesAmazon Q MCP auto-load

Amazon Q MCP auto-load

When: Disclosed / patched spring 2026 (CVE-2026-12957, CVE-2026-12958)
Surface: Amazon Q Developer / AWS language servers · workspace MCP config
Class: Excessive trust — opening a malicious repo silently loaded MCP and inherited the developer environment

Per Wiz / Cybersecurity News reporting and the awesome-ai-agent-attacks  timeline: MCP configs under .amazonq/mcp.json could auto-load without consent or workspace-trust checks; symlink issues compounded the blast radius. Spawned processes inherited AWS keys, session tokens, cloud CLI tokens, API secrets, and SSH agent sockets.

Without Relay

  • “Opening the repo” was enough to attach attacker-chosen tools with the engineer’s full credential environment.
  • No org allowlist decided which MCP servers/tools were permitted for that seat.
  • Credential files remained readable to whatever the agent (or MCP server) proposed next.

How Relay could have safeguarded

LayerWhat to configureEffect on this path
MCP controlDefault deny; allow only known org servers/tools by exact id or globUnexpected MCP tools from a poisoned repo never get an allow
Path controlDeny .env, .aws/, credentials, id_rsa, .ssh/, kube/configAgent / tools cannot Read secrets into context
Bash controlDeny curl |, scp , printenv, exfil patterns; Soft ask on aws mutateShell fallback cannot dump or ship secrets
Privilege StreakEscalate on secrets-path + admin MCP namesCredential-hunting streaks open Guards incidents
AuditFilter Live by MCP deny / behaviorSecurity sees the first blocked tool, not a days-later IAM surprise

Retro checklist

  1. Treat workspace-supplied MCP as untrusted until allowlisted in Relay Rulebook.
  2. Keep prod cloud CLIs on Soft ask / deny for feature-team seats.
  3. Pair with vendor patches—Relay is defense in depth, not a substitute for upgrading Q / language servers.
  4. After a near-miss, export the MCP deny trail for the security postmortem.
Last updated on