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. The malicious AI prompt which is downloaded by the compromised extension – click to enlarge 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 mer...
Compromised Amazon Q extension told AI to delete everything – and it shipped
The Register
·Tim Anderson
·Published Jul 24, 2025
·Updated
Affected Software
2 affected components
Amazon AWS Toolkit for VS Code
Microsoft Visual Studio Code
Frequently Asked Questions
1
What is the main topic of this article?
The article discusses the compromise of the Amazon Q extension for Visual Studio Code, which included a malicious prompt to delete user data.
2
What security implications are discussed in the article?
The article highlights the risks associated with using compromised extensions that can lead to significant data loss and security breaches.
3
What products or software are affected by this incident?
The affected products include the Amazon AWS Toolkit for Visual Studio Code and Microsoft Visual Studio Code itself.
4
How did the malicious prompt impact users?
The malicious prompt instructed the AI to wipe the user's home directory and delete all associated AWS resources.
5
What steps can be taken to mitigate risks from such vulnerabilities?
Users should verify the integrity of extensions before installation and regularly audit installed software for unauthorized changes.