• News/
  • https://www.theregister.com/2025/07/24/amazon_q_ai_prompt/

Compromised Amazon Q extension told AI to delete everything – and it shipped

The Register
·
Tim Anderson
·
Published Jul 24, 2025
·
Updated

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...

Read full article

Affected Software

2 affected components
Amazon AWS Toolkit for VS Code
Microsoft Visual Studio Code
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203