Amazon Q Flaw Exposes Cloud Credential Theft Risk Through Malicious Repositories
Researchers identified a critical security flaw in the Amazon Q Developer extension for Visual Studio Code that could enable attackers to extract developers’ cloud credentials by tricking them into accessing compromised code repositories.
Overview of the Vulnerability
The Amazon Q Developer tool, designed to assist with coding tasks such as generating suggestions, refactoring code, and integrating external services, was found to have a vulnerability allowing unauthorized execution of commands embedded in workspace configurations. The flaw stemmed from the extension’s automatic processing of configuration files within a workspace without user consent. This allowed malicious repositories to execute arbitrary commands in the background upon being opened, potentially exposing cloud credentials and API keys stored in the developer’s environment.
Technical Details and Timeline
The issue was reported to AWS on April 20, with a fix released on May 12. The vulnerability, designated CVE-2026-12957, was addressed in updates covering Amazon Q Developer plugins for Visual Studio Code, JetBrains, Eclipse, and Visual Studio, as well as the language server. A related issue, CVE-2026-12958, involving symbolic link handling was also resolved.
A spokesperson stated that the AWS Language Server version 1.65.0 includes the necessary patches, with automatic updates enabled by default unless restricted by network settings.
Attack Scenarios and Risks
Attack scenarios highlighted by the researchers include deceptive coding challenges, typosquatted open-source packages, and malicious pull requests targeting popular projects. Developers using AWS or other cloud services were at heightened risk, as active session tokens could be intercepted and transmitted without user awareness.
Industry-Wide Implications
Wiz noted that similar vulnerabilities have been observed in other AI-powered coding tools, such as Claude and Cursor, indicating a broader industry challenge. Technical details and proof-of-concept code were published by the firm. The flaw underscores the risks associated with auto-execution features in development environments, where malicious actors can exploit trust in code repositories to compromise both local systems and cloud infrastructure.
Developer Recommendations
Developers are advised to ensure their tools are updated and to exercise caution when interacting with unfamiliar projects or repositories.
