Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentSupply chain

Amazon Q Developer: a wiper prompt shipped in the VS Code extension

MediumAmazon

An attacker slipped code into the official Amazon Q Developer extension that told Amazon's AI agent to wipe the user's computer and delete their AWS resources. The poisoned version shipped, but a syntax error stopped it from running.

Replay the attack step by step in the Learning Center

How it happened

  1. A GitHub token in the extension's build setup had broader permissions than it needed.
  2. The attacker used that access to commit code to the public repository.
  3. The code ran the Q CLI with all tools trusted and a prompt to clean the system to near-factory state and delete cloud resources.
  4. Version 1.84.0 was released with it, but the payload failed because of a syntax error.

Impact

Had it worked, the agent could have deleted local files and any AWS resources the developer's credentials reached.

The fix

AWS revoked the credentials, removed the code and released 1.85.0; delete every copy of 1.84.0.

Lessons

  • Scope CI/CD tokens to the minimum: a compromised pipeline can ship a poisoned AI tool to every user.
  • Review prompts inside shipped code like any other code change.
  • Do not run agents with auto-approve flags on machines that hold cloud credentials.

Sources