What happened
Replaying the Amazon Q extension July 2025 intrusion
- 1
Token and commit
Dates not stated by AWSA pull request built by CodeBuild exposes the repository token, and a token scoped more widely than needed is used to commit malicious code; the sources do not tie the two step by step.
- 2
Release
Jul 19 – 21, 2025, per The RegisterThe release includes the commit automatically: version 1.84 is merged and released on July 19, 2025 and replaced by 1.85 on July 21, per The Register.
- 3
The prompt that did not run
Jul 19 – 21, 2025, per The RegisterThe extension downloads a prompt for an AI agent and passes it to the Amazon Q CLI; AWS states that the code failed to run because of a syntax error, and whether the prompt ran on any machine is not confirmed.
Version 1.84.0 of the extension, with the malicious code, was available for about two days, from July 19 to 21, 2025 per The Register; AWS states that the code failed to run, did not change any services or customer environments and did not affect production services or end users; no source reports a deletion or an install count.
Where cloud-provider controls fit
On AWS, a CodeBuild pull request build policy holds a pull request from an unknown contributor until a trusted contributor approves it, a GitHub App connection leaves the project with no stored personal token, and a manual approval action in CodePipeline holds a release until a person approves it, where the release runs through CodePipeline. The scope of the token, the branch rules and the review of a commit belong to GitHub, and an extension on a developer machine is outside every cloud. If the prompt had run, a service control policy that denies destructive actions, EC2 termination protection and S3 Object Lock in compliance mode would have capped what an AWS profile could delete, and local files would still be at risk. AWS says the code failed to run, so none of these limits was tested.
Could this have been prevented?
In hindsight, no control would have stopped it. 8 controls would have limited how far it went. 4 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.
- 0
- Prevented
- 8
- Contained
- 4
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Replaying the Amazon Q extension July 2025 intrusion
1 · Token and commit
4 Contained2 Not covered3 on other clouds2 · Release
1 Contained3 on other clouds3 · The prompt that did not run
3 Contained2 Not covered6 on other cloudsKey facts
- AWS found the issue while investigating AWS-2025-016 and published its bulletin AWS-2025-015 on July 23, 2025 and updated it on July 25; only version 1.84.0 was affected, and 1.85.0 fixed it; the project published GHSA-7g7f-ff96-5gcw on July 26, and iTnews reported the incident on July 28
- AWS-2025-016, released on July 25, 2025, states that a threat actor used a pull request built by CodeBuild to dump the build environment's memory and extract the repository access token of the AWS Toolkit for Visual Studio Code and AWS SDK for .NET repositories; the date of the extraction is not stated
- A GitHub token in the extension's CodeBuild configuration was scoped more widely than needed, as AWS states; the bulletins do not tie the extraction to the commit step by step, and a claim of a pull request from an account without access is unverified
- The Register reports that the commit had the same title as an earlier legitimate commit, added a script that downloaded a file holding a prompt for an AI agent to delete local files and then cloud resources, and was merged; it does not explain how the commit was reviewed or approved
- The Register dates the merge and release of version 1.84 to July 19, 2025 and version 1.85, which reverted the change, to July 21, so the extension was live for about two days; AWS gives no dates and the number of installs is not stated
- AWS states that the code was distributed with the extension but failed to run because of a syntax error, so it changed no services or customer environments; it revoked and replaced the credentials, removed the code, released 1.85.0 and removed 1.84.0 from distribution
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Security update for Amazon Q Developer Extension for Visual Studio Code (version 1.84)AWS · Jul 23, 2025 · AdvisoryCause, affected and fixed versions, execution status, remediation, customer actions
- 2.Destructive AI prompt published in Amazon Q extensionThe Register · Jul 24, 2025 · NewsPayload description, merge and release dates, AWS statement, unverified claims about the commit, gaps
- 3.Security update for AWS CodeBuild (pull-request builds and repository access tokens)AWS · Jul 25, 2025 · AdvisoryToken extraction technique, affected repositories, CodeBuild remediation, customer actions
- 4.Malicious script injected into Amazon Q Developer for VS CodeGitHub (aws/aws-toolkit-vscode) · Jul 26, 2025 · AdvisoryAffected and patched versions, cause, remediation, severity
- 5.Code syntax error prevented hacked AWS AI dev extension from runningiTnews · Jul 28, 2025 · NewsAttack path as reported, researcher credit, AWS statements
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.