Amazon Q security flaw let malicious Git repos execute code and steal AWS credentials via MCP

3 Sources

Share

A high-severity security flaw in Amazon Q Developer allowed attackers to execute arbitrary code and steal cloud credentials through booby-trapped Git repositories. The vulnerability, tracked as CVE-2026-12957 with a CVSS score of 8.5, exploited how the AI coding assistant handled Model Context Protocol configurations. Wiz Research discovered the bug and Amazon patched it, but the incident highlights broader supply chain risks across AI developer tools.

Amazon Q Security Flaw Exposed Developers to Silent Attacks

A high-severity security flaw in Amazon Q Developer created a dangerous pathway for attackers to execute arbitrary code on developers' machines and steal cloud credentials through malicious repositories. The vulnerability, tracked as CVE-2026-12957 and assigned a CVSS 4.0 score of 8.5, centers on how the AI coding assistant handled Model Context Protocol server configurations

1

. Wiz Research discovered the bug and reported it to Amazon on April 20, with the company releasing a patch on May 12 before the public disclosure on June 26.

Source: Hacker News

Source: Hacker News

The attack vector was alarmingly simple. A developer only needed to clone a malicious repository and activate Amazon Q for the exploit to trigger. The extension would automatically load a repository's .amazonq/mcp.json file and execute the commands it contained, with no prompt, no consent step, and no workspace trust check

1

. This violated the fundamental security model that assumes users explicitly configure MCP servers before granting an AI assistant permission to run arbitrary commands on their machine.

How Rogue MCP Servers Enabled Credential Theft

The Model Context Protocol lets AI coding assistants launch local processes to carry out tasks, connecting models to databases, APIs, and build tools. In Amazon Q's case, those processes inherited the developer's full environment, granting access to AWS credentials, IAM roles, API keys, authentication tokens, SSH agent sockets, and other secrets already loaded into the session

1

. This meant a single malicious MCP configuration file could execute commands with complete access to the developer's credentials, requiring no user interaction beyond opening the folder and activating Amazon Q.

Wiz Research demonstrated the attack by building a proof-of-concept repository with a malicious MCP configuration. When opened, the extension executed a command against AWS using the developer's existing credentials, specifically running aws sts get-caller-identity and sending the output to an attacker-controlled server. The command returns the developer's AWS account ID, user ARN, and session credentials, providing everything an attacker needs to access cloud resources

3

.

Patched Versions and Update Requirements

Amazon fixed the vulnerability in version 1.65.0 of its language server, which powers Amazon Q's IDE integrations across Visual Studio Code, JetBrains, Eclipse, and Visual Studio

1

. However, Amazon's bulletin directs customers to move to version 1.69.0, which also closes a second issue, CVE-2026-12958, involving a missing symlink check that could allow arbitrary file writes outside the workspace trust boundary.

The patched plugin minimums include VS Code version 2.20 or later, JetBrains version 4.3 or later, Eclipse version 2.7.4 or later, and Visual Studio toolkit version 1.94.0.0 or later. Existing installations should receive the patched component automatically unless automatic updates have been blocked. The language server auto-updates unless the network blocks it, and reloading the IDE pulls the latest build.

Industry-Wide Supply Chain Risks in AI Developer Tools

Wiz Research argues this security flaw represents less an Amazon problem than an industry-wide issue. More AI coding assistants are adopting MCP to connect models to local tools and services, allowing them to execute commands on developers' machines

1

. According to the researchers, similar workspace configuration flaws have recently surfaced in other AI coding tools, suggesting attackers have found a new place to lurk in the hidden files that developers rarely think twice about trusting.

Source: The Register

Source: The Register

Amazon Q Developer joins a growing list of AI coding assistants vulnerable to supply chain attacks that exploit the trust these tools place in repository contents. Claude Code (CVE-2025-59536) and Cursor (CVE-2025-54136) both had project-level MCP configuration issues that led to command execution, while Windsurf (CVE-2026-30615) reached the same end through attacker-controlled content rewriting the local MCP configuration to register malicious servers. The convenience of letting a project folder configure an AI agent creates the attack surface, as repo-carried configuration represents untrusted input that should require explicit consent before turning into a running process.

Amazon says there is no evidence the flaw was exploited in the wild, and CISA's advisory database lists no known attacks

3

. Developers using Amazon Q should update their IDE plugins immediately and audit any recently cloned repositories for unexpected configuration files. The broader lesson is that any configuration file capable of triggering code execution at clone time represents a weapon, and tools that auto-execute it are operating without proper safeguards.

Today's Top Stories

© 2026 TheOutpost.AI All rights reserved