Compromised Amazon Q Extension Told Ai To Delete Everything – And It Shipped
The official Amazon Q extension for Visual Studio Code (VS Code) was compromised to include a prompt to wipe the user’s home directory and delete all their AWS resources.
The bad extension was live on the VS Code marketplace for two days, though it appears that the intent was more to embarrass AWS and expose bad security rather than to cause immediate harm.
A commit to the Amazon Q part of the AWS toolkit for VS Code includes a script that downloads an additional file, saved as extensionNode.ts
. The source for this file includes a prompt instructing an AI agent to delete all non-hidden files from the user’s home directory and then to “discover and use AWS profiles to list and delete cloud resources using AWS CLI commands.”
The script then passes this prompt to the Amazon Q CLI, including the arguments --trust-all-tools
and --no-interactive
.
According to a report, “a person who presented themselves as the hacker responsible” contacted 404 Media to explain that the wiper was designed to be defective, but was “a warning to see if they’d publicly own up to their bad security.”
The person claimed that they submitted a pull request to the AWS repository from “a random account with no existing access” and were given admin credentials. They said that AWS then released the compromised package “completely oblivious.”
Whether or not that report is correct, we can see the bad commit was indeed merged and released in version 1.84 of the extension on July 19, and reverted in version 1.85 published two days later. The changelog for 1.85 states: “Miscellaneous non-user-facing changes.”

The changelog for the fixed extension refers to miscellaneous non-user-facing changes – click to enlarge
AWS posted a security bulletin, which states:
AWS is aware of and has addressed an issue in the Amazon Q Developer Extension for Visual Studio Code (VSC). Security researchers reported a potentially unapproved code modification was attempted in the open source VSC extension that targeted Q Developer CLI command execution. This issue did not affect any production services or end-users.
Once we were made aware of this issue, we immediately revoked and replaced the credentials, removed the unapproved code from the codebase, and subsequently released Amazon Q Developer Extension version 1.85 to the marketplace.
This statement does not address the key issue of how the incident was allowed to happen. The consequences of unauthorized code in a popular AWS extension for VS Code could be calamitous. There are hints that the AWS SDK for .NET was compromised as well, though we have no details of this, and the AWS bulletin states that “no action is required for AWS SDK for .NET users.”
The malicious commit has the same title as a previously merged commit, though the code itself is not at all related. The commit is also obviously suspicious, downloading a file from somewhere on GitHub to overwrite another file in the package. The implication, perhaps, is that there is too much reliance on AI to check the security of the code, in this case badly, and not enough human checks. This line of thinking is encouraged by another remark attributed to the bad actor, that “ruthless corporations leave no room for vigilance among their overworked developers.”
AWS has recently laid off a number of workers and Amazon CEO Andy Jassy has stated in a memo to employees that AI is likely to “reduce our total corporate workforce as we get efficiency gains from using AI extensively across the company.”
Could such “efficiency gains” affect the security of official AWS tooling, as this latest incident implies? It is a disturbing possibility, considering that the company has historically maintained a strong security record.
AWS watcher Corey Quinn asked the key question: “What did Amazon’s internal review process for this repo actually look like?” and concluded that “it’s the same mess I called out back in 2022 when Azure’s security posture fell flat on its face: companies treating security like an afterthought until it explodes in public.” ®
A considerable amount of time and effort goes into maintaining this website, creating backend automation and creating new features and content for you to make actionable intelligence decisions. Everyone that supports the site helps enable new functionality.
If you like the site, please support us on “Patreon” or “Buy Me A Coffee” using the buttons below
To keep up to date follow us on the below channels.