how it happened
- whoan outside GitHub accountno June activity found by one researcher
- the gapa write token in the buildAWS: inappropriately scoped, in CodeBuild
- thenthe release script swaps a fileonly in production release builds
- the resultversion 1.84.0 ships the promptAWS: it failed to run because of a syntax error
what everyone assumed
Amazon Q Developer is AWS’s AI coding assistant, and its VS Code extension is published by AWS from an open-source repository on GitHub. BleepingComputer reported in July 2025 that the extension counted nearly one million installs on the VS Code marketplace. For a developer, an extension from a cloud provider of that size is about as safe as software gets: the code lives in the vendor’s own repository, changes go through the vendor’s review, and releases come out of the vendor’s own build system.
AWS has not published what its users believed, so this belief is an inference from how the extension was installed and updated. It was a reasonable one. The weak point was the build, which held a key that could change the code without anyone reviewing it.
what happened
The token. AWS’s bulletin AWS-2025-015, in its revised text of 25 July 2025, says the extension had an “inappropriately scoped GitHub token” in its CodeBuild configuration, and that a threat actor used it to commit malicious code into the open-source repository, which was then included in a release automatically. A second bulletin, AWS-2025-016, published the same day, explains the route in general terms. Researchers had shown that a pull request built automatically by CodeBuild could read the repository’s access token out of the build environment’s memory. AWS says it found that a threat actor had used this technique to take the tokens for two repositories: the AWS Toolkit for VS Code, where the Amazon Q extension lives, and the AWS SDK for .NET. AWS does not say which pull request was used or when.
The commits. The repository’s history, still public and checked on 13 November 2026, fills in the rest. On 13 July 2025 two commits appeared under a GitHub account that no longer exists.
- The first, titled “fix(amazonq): Shut it down”, put a prompt into a side file in the
scriptsfolder. The prompt tells an AI agent with file and shell access to return the machine to a near-factory state, starting with the user’s home directory, then to find the AWS profiles on the machine and delete cloud resources with them, naming commands that terminate servers, delete stored files and delete users. The code ran theqcommand-line tool with the flags--trust-all-toolsand--no-interactive. AWS’s own CLI reference at the time described the first flag as letting the model use any tool to run commands without asking for confirmation. - The second went onto the main branch. It changed the release packaging script so that, only in production release builds on Linux, the build would download that side file from a tag named
stabilityand write it over one of the extension’s own source files. Test builds would never see it. The commit reused the exact title and author time of a routine fix merged through pull request 7647 two days earlier, and GitHub lists no pull request of its own for it.
Michael Bargury, a researcher who rebuilt the timeline from the commit record and the GH Archive public event log on 24 July 2025, found that the stability tag was created by the project’s automation account about half an hour before the prompt commit. He lists as open questions how the second commit reached the main branch and who triggered the tag. AWS has not answered either in its bulletins.
The release. Version 1.84.0 was published on the repository’s release page on 17 July 2025, and a comparison with 1.83.0 shows the packaging change inside it. AWS’s revised bulletin says the malicious code went out with the extension but failed to execute because of a syntax error, so it made no changes to any services or customer environments. That is AWS’s finding from its own inspection. 404 Media’s report of 23 July 2025 also judged the real risk of wiped computers to be low.
The person behind it. Someone who told 404 Media they were responsible said a pull request from a random account with no prior access was enough, and that they were then handed admin credentials. They said the wiper was “designed to be defective”, in The Register’s relay of 404 Media, and that the aim was to expose what they called Amazon’s AI security theater. These are the attacker’s claims. Bargury, who cites 404 Media for a pull request in late June, found no activity by the account in the repository in June 2025 and could not confirm the story.
step by step
- 11 July 2025a normal change is mergedA pull request with a routine fix to inline suggestions is reviewed and merged into the extension's main branch.
- 13 July 2025two commits under an outside accountOne puts a wipe prompt in a side file, the other changes the packaging script to swap that file into release builds, under the title of the routine fix.
- 17 July 2025version 1.84.0 is released with the changeThe repository's release record shows the packaging change inside 1.84.0, so the vendor's own build put the prompt in the extension.the assumption breaks here
- 18 and 19 July 2025revert and a clean releaseA pull request reverts the packaging change and version 1.85.0 follows, with no public notice yet.
- 23 to 25 July 2025the story and the bulletins404 Media reports it, AWS publishes a bulletin and rewrites it two days later to describe a threat actor and a token that was scoped too broadly.
how it surfaced
The repository record shows AWS acting before anything was public. On 18 July 2025 a pull request with three approvals reverted the packaging change, and version 1.85.0 was released on 19 July. Some press accounts give different dates: BleepingComputer wrote that Amazon learned of the problem on 23 July and released 1.85.0 the next day, which does not match the release timestamps on GitHub.
The public learned on 23 July 2025, when 404 Media published the story. AWS’s first bulletin that evening, as archived on 24 July, said researchers had reported that an unapproved code modification had been attempted and that the issue did not affect any production services or end users. On 25 July AWS rewrote it: a threat actor, a token scoped too broadly, code distributed with the extension, CVE-2025-8217, and an instruction to remove every installation of 1.84.0, including forks, because the code was still present in them. The GitHub advisory GHSA-7g7f-ff96-5gcw rates it medium.
An Amazon spokesperson told BleepingComputer on 26 July 2025 that the company had quickly mitigated an attempt to exploit a known issue in two open-source repositories and that no customer resources were affected. AWS-2025-016 recommends that CodeBuild users stop building pull requests from untrusted contributors automatically, rotate any token such a build could reach, and remove write permissions that are not needed.
No source gives the number of people who installed 1.84.0.
The Nx packages of August 2025 drove the same kind of AI command-line tool with its prompts switched off, from a poisoned npm package. The guide on coding agents and tokens covers why that switch matters on a developer’s machine, GitHub as an identity surface covers write tokens and branch protection, and pipeline secrets covers what a build can be made to reveal. The tj-actions case is another tag that pointed at code nobody had reviewed.
A release is only as reviewed as the least reviewed credential that can write to the branch it is built from.
Ask which tokens your build service holds, and whether any of them can push to the branch your releases come from.
picture it at a company like yours
The company here is made up. The other two paths are not: they happened, and each links to the story.
- in this storythe day it mattersA stranger opens a pull request, the build runs their code, and the token leaves with it.what it costs youYour next release carries a file nobody on the team wrote, and it goes to every customer who updates.
- or it goes like thisit happenedSolarWinds / Sunburst, 2020howA genuine, signed update from a certified vendor carries a backdoor.what leavesa quiet way into your networkwho ends up with ita state intelligence service
- or it goes like thisit happenedtj-actions/changed-files, 2025howA build helper everyone uses is hijacked and its versions repointed.what leavessecret keys, printed into build logswho ends up with itanyone reading public logs
sources
- AWS security bulletin AWS-2025-015: Security update for Amazon Q Developer Extension for Visual Studio Code (Version #1.84), published 23 July 2025, updated 25 July 2025
- AWS security bulletin AWS-2025-015 as first published, archived 24 July 2025 (Internet Archive)
- AWS security bulletin AWS-2025-016: Memory dump issue in AWS CodeBuild, 25 July 2025
- GitHub advisory GHSA-7g7f-ff96-5gcw (CVE-2025-8217): Malicious script injected into Amazon Q Developer for VS Code Extension, aws/aws-toolkit-vscode
- aws/aws-toolkit-vscode commit 678851b: change to the release packaging script, 13 July 2025
- aws/aws-toolkit-vscode commit 1294b38: the prompt file, 13 July 2025
- aws/aws-toolkit-vscode pull request 7647, merged 11 July 2025 (the commit whose title was copied)
- aws/aws-toolkit-vscode pull request 7710: revert of commit 678851b, merged 18 July 2025
- aws/aws-toolkit-vscode release Amazon Q for VS Code 1.84.0, 17 July 2025
- aws/aws-toolkit-vscode release Amazon Q for VS Code 1.85.0, 19 July 2025
- Amazon Q Developer user guide: Amazon Q CLI command reference, archived 17 July 2025 (Internet Archive)
- Michael Bargury: Constructing a timeline for Amazon Q prompt infection, 24 July 2025
- 404 Media: Hacker plants computer 'wiping' commands in Amazon's AI coding agent, 23 July 2025
- The Register: Compromised Amazon Q extension told AI to delete everything, and it shipped, 24 July 2025
- BleepingComputer: Amazon AI coding agent hacked to inject data wiping commands, 25 July 2025, updated 26 July 2025
your turn
what you can do about it
this week
List every token your build service holds that can push to your main branch, and turn off automatic builds of outside pull requests.
Open your CI or build service settings and note each repository token, what it can write to and who issued it. Where a build only needs to read code, replace the token with a read-only one, and set the service to build pull requests from outside contributors only after someone approves them, which is what AWS-2025-016 advises. The Amazon Q release carried a file its team never reviewed because a build held a key that could write to the main branch: which of your builds holds one today?
go deeper
if you're not sure where to start
Run the offboarding checklist on one leaver. It covers every account and token to close when someone leaves.
open the checklist →
