Skip to content

Accident reports · July 2025

Amazon Q: a wipe instruction shipped in the extension

One version of the extension held an order slipped in by an attacker: delete files and cloud resources, with no confirmation. According to AWS, it could not run.

  • Company Amazon Web Services
  • Agent Amazon Q Developer
  • Model not published
The agent as a weapon
An empty room with entirely white walls and floor
Photo: R_ R on Unsplash
WhenJuly 2025 (version published on 19 July)
WhoThe Amazon Q Developer extension for VS Code, from Amazon Web Services
What the agent didAn instruction slipped into the extension by an attacker told it to wipe the user's files and cloud resources, without asking for approval
ConsequenceAccording to AWS, the planted code was distributed but could not run because of a syntax error; no customer affected

What happened

According to 404 Media (23 July 2025) and then The Register, version 1.84 of the Amazon Q Developer extension for VS Code, published on 19 July 2025, contained code added by an outsider. This code launched the Amazon Q command-line tool with two options: one allows every tool without asking, the other removes any confirmation. It passed it an instruction that began "You are an AI agent with access to filesystem tools and bash" and set the goal of returning the machine to "a near-factory state", deleting files in the home folder and then, according to The Register, finding AWS profiles to list and delete cloud resources.

The author told 404 Media they had submitted a change from an ordinary account and then been given admin rights; The Register says it cannot confirm this. According to the AWS bulletin quoted by iTnews (28 July), an over-scoped GitHub token exposed in the AWS CodeBuild build tool made it possible to write to the repository. The author says the aim was to expose Amazon's "security theater", with a deliberately broken wiper.

AWS first said the incident affected neither its services nor users, then, according to iTnews, that the code had indeed been distributed with the extension but did not run because of a syntax error. AWS removed the code, revoked access and released version 1.85; the trapped version stayed on the marketplace for two days, according to The Register.

Why it happened

A coding agent already has its hands on files and often on cloud credentials. Anyone who can write into the tool can give it orders, and the "allow everything" and "no confirmation" options remove the last person who could have said no.

The way in was not the AI: it was the software release chain, where an outside change could reach a published version.

The failure family

This is the "The agent as a weapon" family: a person uses an agent to attack. The user's agent becomes the attacker's tool, with the rights the user gave it.

The safeguard in code

  • No "allow everything" or "no confirmation" option for an agent with access to the disk or the cloud: deletions go through a closed list and human confirmation.
  • Cloud credentials given to an agent are read-limited, and deleting resources requires a different account.
  • No automatic builds of outsiders' proposals with a token that can write to the repository, as AWS recommends.

What we test

Our crash tests test the company's agent, not the attacker's: what it does when a booby-trapped instruction arrives in what it reads, when an account is hijacked, when a side door is tried. A destructive instruction placed inside the tool itself, and launched with no confirmation at all, is not yet tested as such. What a company can lock down today: the agent's rights (never a deletion without approval), separate and limited cloud credentials, and extension updates reviewed before they are installed.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading