Flaw exploited via malicious Git repositories highlights security risks in AI-based coding assistants.
A security flaw in Amazon Q, Amazon's artificial intelligence assistant for developers, allowed compromised Git repositories to execute arbitrary code and steal cloud credentials. The vulnerability was exploited through project configuration files, which tricked the tool into processing malicious commands during code analysis.
According to security researchers, the issue highlights a structural vulnerability affecting not only Amazon Q, but also several AI-based coding assistants currently available on the market. By automating tasks and interpreting project configurations, these tools can be tricked into executing harmful actions if they lack sufficient isolation and validation mechanisms.
The practical attack consisted of tricking a developer into interacting with an infected repository. Once triggered, the AI assistant processed the hidden instructions in the configurations, resulting in the execution of unauthorized scripts. Researchers warn that the impact of a successful exploitation includes the theft of cloud infrastructure access keys, paving the way for broader data breaches.
The discovery raises debates about the limits of autonomy granted to AI agents in development environments. Experts point out that the ability of these tools to interpret and execute commands from configuration files requires the adoption of stricter security practices, such as permission isolation and active verification of code sources.
Amazon was notified about the flaw prior to public disclosure. The company applied fixes to mitigate the risk of improper code execution in Amazon Q, although the security community emphasizes that continuous vigilance is necessary to prevent similar attack vectors in other AI platforms.
The flaw was exploited through malicious project configuration files in compromised Git repositories, which tricked the AI assistant into processing hidden instructions and executing unauthorized scripts during code analysis.
Successful exploitation allowed attackers to execute arbitrary code and steal cloud infrastructure access keys, which could lead to broader data breaches.
Experts recommend adopting stricter security practices such as permission isolation, active verification of code sources, and sufficient validation mechanisms to prevent AI tools from executing harmful actions.