MCP Auto-Execution: From Git Clone to Cloud Compromise in Amazon Q VS Code Extension
Summary
Wiz Research identified a high-severity vulnerability, CVE-2026-12957, in the Amazon Q Developer Extension for Visual Studio Code. This flaw allowed attackers to achieve arbitrary code execution and cloud credential theft by simply having a developer open a malicious repository. Amazon Q, an AI-powered coding assistant, automatically loaded Model Context Protocol (MCP) server configurations from workspace files without user consent, and combined with full environment inheritance, this enabled immediate code execution. The issue affected language server versions prior to 1.65.0 and has since been remediated by Amazon in version 1.65.0. This vulnerability is part of a broader pattern of MCP auto-execution risks found across other AI coding tools, including findings by OX Security and Check Point.
Key takeaway
For AI Engineers or Software Engineers using VS Code with AI coding assistants, understand that opening untrusted repositories can lead to immediate system compromise. Your development environment's deep integration with tools like Amazon Q means malicious workspace configurations can execute silently. This could steal cloud credentials or enable supply chain attacks. Always scrutinize MCP consent prompts and review unfamiliar ".amazonq/" folders to mitigate this systemic risk.
Key insights
AI coding tools' auto-execution of workspace configurations without consent poses a systemic risk for code execution and credential theft.
Principles
- Treat workspace configs as untrusted input.
- Require explicit consent for code execution.
- Limit environment inheritance for spawned processes.
In practice
- Review MCP consent prompts carefully.
- Check for unexpected ".amazonq/" folders.
- Audit existing MCP server configurations.
Topics
- Amazon Q Developer
- Visual Studio Code
- Model Context Protocol
- Supply Chain Security
- Cloud Security
- Arbitrary Code Execution
- CVE-2026-12957
Code references
Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Security Engineer, Software Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by wiz.io - Www.wiz.io.