Amazon Q Developer Flaw Could Let Malicious Repos Run Code via MCP Configs
A high-severity flaw in Amazon Q Developer allowed malicious repositories to run commands and steal cloud credentials. The issue is patched in Language Servers for AWS 1.65.0.
Intelligence analysis by Llama 3.3 70B

The flaw enabled malicious repositories to run arbitrary code with a developer's live cloud session, potentially leading to cloud compromise and data theft.
Imagine you're working on a project and you trust a new tool to help you. But, what if that tool could secretly run bad code and steal your important keys? That's what happened with a flaw in Amazon Q Developer. It's like leaving your house keys in a public place, and someone bad finds them.
Analysis
Introduction to Amazon Q Developer Flaw
The recently discovered flaw in Amazon Q Developer, tracked as CVE-2026-12957, poses a significant risk to developers who use the platform. The vulnerability allows malicious repositories to run commands and steal cloud credentials, potentially leading to cloud compromise and data theft.
The Attack Vector
The attack works by exploiting the way Amazon Q Developer handles Model Context Protocol (MCP) servers. When a developer opens a repository and trusts the workspace, Amazon Q reads an MCP configuration file and launches the defined servers. These servers can inherit the developer's full environment, including AWS keys, cloud CLI tokens, and SSH agent sockets. An attacker can drop a malicious config file in a repository, which can then run arbitrary code with the developer's live cloud session attached.
Implications and Mitigations
The implications of this flaw are severe, as it could allow attackers to backdoor an IAM user, reach internal services, or pivot toward production. However, Amazon has patched the issue in Language Servers for AWS 1.65.0, and users are advised to update to the latest version. The patch introduces a consent step for MCP servers, allowing developers to reject untrusted commands before they run. It is essential for developers to be aware of this vulnerability and take steps to protect themselves, including updating their plugins and being cautious when trusting repositories and workspaces.
Key points
- A high-severity flaw in Amazon Q Developer allowed malicious repositories to run commands and steal cloud credentials.
- The issue is patched in Language Servers for AWS 1.65.0.
- Developers should update their plugins and be cautious when trusting repositories and workspaces.
The prompt patching of the vulnerability by Amazon and the introduction of a consent step for MCP servers demonstrate the company's commitment to security. This incident also highlights the importance of responsible disclosure and collaboration between researchers and vendors, which can lead to quicker resolutions and enhanced security for users.
The discovery of this flaw underscores the potential risks associated with AI coding assistants and the trust developers place in them. If exploited, such vulnerabilities could lead to significant breaches, emphasizing the need for continuous vigilance and robust security measures in the development community.



