Skip to main content
Back
IntrusionAWS · SaaS
8 min read

Malicious prompt committed to the Amazon Q Developer extension release

Victim
AWS (Amazon Q Developer extension for VS Code, version 1.84.0)
When
July 19, 2025 per The Register; AWS gives no date – Jul 21, 2025Disclosed Jul 23, 2025
Entry
A pull request built automatically by AWS CodeBuild ran code that dumped the build environment's memory and exposed the repository access token (AWS-2025-016). A GitHub token in the extension's CodeBuild configuration, scoped more widely than needed, was used by a threat actor to commit malicious code to the extension's open-source repository, and the release included the code automatically (AWS-2025-015). The bulletins do not tie the extraction to the commit step by step.

AWS 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, and that a GitHub token in the CodeBuild configuration of the Amazon Q Developer extension for Visual Studio Code was inappropriately scoped and was used to commit malicious code that a release included automatically. The Register dates the merge and release of version 1.84 to July 19, 2025 and the fix, version 1.85, to July 21, and says the code held a prompt that told an AI agent to delete local files and then cloud resources. AWS states that the code was distributed but failed to run because of a syntax error; the bulletins do not tie the extraction to the commit step by step.

What happened

External Parties
Security researcher
CodeBuild researchers
Internet
AWS Cloud APIprofiles named in the prompt
Extension Build and Release · AWS
Extension Repository · GitHub
+ extension 1.84.0
+ Amazon Q CLI
+ AWS profiles, home files
Customer Machines
Release system unnamed
Build Config · GitHub Token
Extension Repository

Replaying the Amazon Q extension July 2025 intrusion

  1. 1

    Token and commit

    Dates not stated by AWS

    A 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. 2

    Release

    Jul 19 – 21, 2025, per The Register

    The 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. 3

    The prompt that did not run

    Jul 19 – 21, 2025, per The Register

    The 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.

Impact

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.

Outcome

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.

External Parties
Security researcher
CodeBuild researchers
Internet
AWS Cloud APIprofiles named in the prompt
Extension Build and Release · AWS
Extension Repository · GitHub
+ extension 1.84.0
+ Amazon Q CLI
+ AWS profiles, home files
Customer Machines
Release system unnamed
Build Config · GitHub Token
Extension Repository

Replaying the Amazon Q extension July 2025 intrusion

1 · Token and commit

4 Contained2 Not covered3 on other clouds

2 · Release

1 Contained3 on other clouds

3 · The prompt that did not run

3 Contained2 Not covered6 on other clouds

Key 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. 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. 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. 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. 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. 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.

More cloud attack breakdowns

All breakdowns