Description

Amazon has addressed a high-severity security vulnerability, tracked as CVE-2026-12957, affecting Amazon Q Developer IDE plugins. The flaw could allow a malicious Git repository to execute arbitrary commands on a developer's workstation after the repository is opened and the workspace is marked as trusted. Successful exploitation could expose cloud credentials, API tokens, SSH agent sockets, and other sensitive environment variables, potentially leading to compromise of AWS environments. The issue was responsibly disclosed by Wiz Research and has since been patched by Amazon. The vulnerability exists in the way Amazon Q Developer processed Model Context Protocol (MCP) configuration files stored within a repository, specifically the .amazonq/mcp.json file. When a developer opened a malicious repository and trusted the workspace, Amazon Q automatically launched the MCP servers defined in the configuration. Since MCP servers execute as local processes, they inherited the developer's environment, including AWS credentials, cloud CLI authentication tokens, API keys, SSH agent sockets, and other sensitive secrets. An attacker could therefore embed malicious commands inside the repository configuration, resulting in arbitrary code execution without requiring additional authentication. Wiz demonstrated the attack by executing the aws sts get-caller-identity command and transmitting the active AWS session details to an attacker-controlled server. Depending on the victim's cloud permissions, attackers could establish persistence, access internal infrastructure, modify cloud resources, or pivot into production environments. Amazon confirmed the issue and released updated Language Servers for AWS and corresponding Amazon Q Developer plugin versions that eliminate the unsafe behavior.