Kyvvu

Agent incident database

Amazon Q extension shipped with a prompt telling its agent to wipe data

23 Jul 2025Amazon Web Services · Amazon Q Developer extension for VS Codedestructive actionincident

An attacker used an over-permissioned GitHub token to slip a malicious prompt into an official release of Amazon's AI coding extension. The prompt told the AI agent to delete the user's files and cloud resources, but AWS says it failed to run because of a syntax error.

How it unfolded

Each step on its own looked like ordinary agent work. The harm came from the sequence.

  1. 1

    Extension update delivered an attacker-written prompt to the agent

  2. 2

    Prompt passed to the Amazon Q agent with all tools trusted and no confirmation

  3. 3

    Instructed to run shell commands deleting files in the user's home directory

    harm
  4. 4

    Instructed to read local AWS profiles

  5. 5

    Instructed to list and delete cloud resources with the AWS CLI

    harm

Which policy would have stopped this?

In our reading of the reports, these policies from the open library stop the harmful step before it runs.

Open Code execution requires a preceding gate in the playground and build the path yourself.

This is our reading of public reporting. We haven't run it against the original systems.

What happened

According to AWS security bulletin AWS-2025-015 (CVE-2025-8217), a GitHub token in AWS's CodeBuild configuration had broader access than needed, and a threat actor used it to commit malicious code to the extension's open-source repository. The code was automatically included in version 1.84.0. The Register reported that the added script passed a prompt to the Amazon Q CLI with the --trust-all-tools and --no-interactive flags, instructing the agent to delete non-hidden files in the user's home directory and to 'discover and use AWS profiles to list and delete cloud resources'. AWS said the code was distributed but did not execute because of a syntax error, and made no changes to AWS services or customer environments. The person claiming responsibility told 404 Media (as reported by The Register) that the wiper was designed to be defective.

Outcome

AWS revoked and replaced the credentials, removed the code, released version 1.85.0 and pulled 1.84.0 from distribution. It says no customer environments were affected and advised removing 1.84.0 installations. Sources differ on the release date of 1.84.0 (17 or 19 July 2025).

Sources

A summary of public reporting. The step-by-step timeline is our reading of those sources; where they differ, we say so above.

Your agents

Could this happen to yours?

For security teams

Request a demo

We walk through your agents' riskiest paths with you.

For developers

Build a path yourself

Recreate a sequence in the playground and see how policies treat it.