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.
| Disclosed | July 23, 2025 |
|---|---|
| Affected | Amazon Q Developer for VS Code, AWS CodeBuild, AWS |
| Type | AI agent |
| Status | Resolved |
| CVE | CVE-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
- 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.
- 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.
- 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.
- Remove write permissions from CodeBuild repository credentials unless a build truly needs to push.
- 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
- 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
- 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
- GitHub advisory GHSA-7g7f-ff96-5gcw is published for the extension, rated moderate. Source
- 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.
Other ai agent and mcp incidents
- OpenCode on Windows and WSL ran commands from a malicious MCP server during OAuth sign-in 2026-10-04
- OpenCode server's upgrade endpoint let any webpage install an attacker's npm package 2026-09-24
- Cursor before 3.0: prompt-injected agent could escape its sandbox and run code as the user 2026-06-05
- Claude Code trust dialog could be bypassed with a spoofed git worktree, running repo hooks 2026-04-24
- Claw Chain: four OpenClaw flaws let a foothold read agent secrets and escape the sandbox 2026-04-23
- OpenClaw Control UI sent its gateway token to any gatewayUrl in a link, enabling 1-click RCE 2026-01-31