AI agent · July 23, 2025

Amazon Q Developer VS Code extension 1.84.0 shipped injected code after a CodeBuild token leak

ResolvedUpdated CVE-2025-8217AWS-2025-015AWS-2025-016GHSA-7g7f-ff96-5gcw

In July 2025 AWS disclosed that version 1.84.0 of its Amazon Q Developer extension for VS Code shipped with injected code designed to call the Q Developer CLI, after an attacker extracted an over-scoped GitHub token from the project's AWS CodeBuild configuration and committed to the open-source repository. AWS says a syntax error stopped the code from running and that it could not change services or customer environments. Remove 1.84.0, install 1.85.0 or later, and if you run CodeBuild on untrusted pull requests, rotate the repository token it uses.

DisclosedJuly 23, 2025
AffectedAmazon Q Developer for VS Code, AWS CodeBuild, AWS
TypeAI agent
StatusResolved
CVECVE-2025-8217

What was exposed

The direct exposure was a GitHub token with write access that AWS says was inappropriately scoped and reachable from the CodeBuild environment that built the extension. AWS-2025-016 explains the general issue: when CodeBuild runs automatically on pull requests from untrusted contributors, the PR's code can read the build's memory and extract the GitHub, Bitbucket or GitLab token CodeBuild uses. For extension users, AWS says the injected code failed because of a syntax error and could not change any services or customer environments, so AWS does not ask users to rotate their own AWS credentials. Because the injected code targeted an AI coding agent's CLI, the incident shows how a compromised extension could try to drive an agent that has the developer's cloud access.

Am I affected?

Extension users: you are affected if Amazon Q Developer for VS Code version 1.84.0 is or was installed in VS Code or in a fork or derivative editor. Check the version in the Extensions panel. AWS says the code is still present in existing 1.84.0 copies even though it cannot run. CodeBuild customers: you are exposed to the same technique if a CodeBuild project builds pull requests from untrusted contributors automatically and its repository token has write permission.

What to do now

  1. Remove every installation of Amazon Q Developer for VS Code 1.84.0 and update to 1.85.0 or later, including in forks and derivative editors.
  2. In CodeBuild, turn off automatic builds for pull requests from untrusted contributors, or add webhook event or actor filters so only trusted users trigger builds.
  3. If such builds ran with a write-capable repository token, rotate that GitHub, Bitbucket or GitLab token and review the repository's git and audit logs for commits made with it.
  4. Remove write permissions from CodeBuild repository credentials unless a build truly needs to push.
  5. For public repositories that need builds of outside contributions, AWS suggests self-hosted GitHub Actions runners in CodeBuild, which it says are not affected.

Keys to rotate

Guides to the credentials this incident put at risk:

Timeline

  1. AWS publishes bulletin AWS-2025-015: Amazon Q Developer for VS Code 1.84.0 contains malicious code committed with a GitHub token from the extension's CodeBuild configuration. AWS says it revoked and replaced the credentials and released 1.85.0. Source
  2. AWS publishes AWS-2025-016: a malicious pull request built automatically by CodeBuild could dump the build's memory and extract the source-repository token. AWS says an actor used this to obtain tokens for the AWS Toolkit for VS Code and AWS SDK for .NET repositories. Source
  3. GitHub advisory GHSA-7g7f-ff96-5gcw is published for the extension, rated moderate. Source
  4. CVE-2025-8217 is published, describing inert injected code designed to call the Q Developer CLI when the extension launches. Source

Indicators

From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.

  • Amazon Q Developer for VS Code version 1.84.0. AWS publishes its SHA-256 hash in AWS-2025-015.
  • Unexpected commits to repositories made with a CodeBuild-held token after an automated pull-request build.

Frequently asked questions

Am I affected by the Amazon Q Developer for VS Code incident?

Extension users: you are affected if Amazon Q Developer for VS Code version 1.84.0 is or was installed in VS Code or in a fork or derivative editor. Check the version in the Extensions panel. AWS says the code is still present in existing 1.84.0 copies even though it cannot run. CodeBuild customers: you are exposed to the same technique if a CodeBuild project builds pull requests from untrusted contributors automatically and its repository token has write permission.

What was exposed in the Amazon Q Developer for VS Code incident?

The direct exposure was a GitHub token with write access that AWS says was inappropriately scoped and reachable from the CodeBuild environment that built the extension. AWS-2025-016 explains the general issue: when CodeBuild runs automatically on pull requests from untrusted contributors, the PR's code can read the build's memory and extract the GitHub, Bitbucket or GitLab token CodeBuild uses. For extension users, AWS says the injected code failed because of a syntax error and could not change any services or customer environments, so AWS does not ask users to rotate their own AWS credentials. Because the injected code targeted an AI coding agent's CLI, the incident shows how a compromised extension could try to drive an agent that has the developer's cloud access.

Which keys should I rotate?

Rotate any GitHub, GitLab, Bitbucket credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.