[来源关键摘录] Technical breakdown of CVE-2025-8217 showing how a threat actor injected wiper prompts targeting local files and AWS cloud resources into Amazon Q Developer v1.84.0.
[正文前段节选] Skip to main content
How a cloud breach happens in 5 minutes.Explore Cloud Attack Breakdowns
IntrusionAWS · SaaS
Malicious prompt committed to the Amazon Q Developer extension release
VictimAWS (Amazon Q Developer extension for VS Code, version 1.84.0)
WhenJuly 19, 2025 per The Register; AWS gives no date – Jul 21, 2025Disclosed Jul 23, 2025
EntryA 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.
A July 2025 release of the Amazon Q Developer extension for Visual Studio Code included a malicious prompt directing the AI agent to delete files and cloud resources. AWS said an overly broad GitHub token allowed the code change and a syntax error kept it from running. The Register dated the affected release to July 19 and the fix to July 21.
What happened
External Parties
Security researcher
CodeBuild researchers
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
What happened · Phase 1 of 3
Replaying the Amazon Q extension July 2025 intrusion
Token, commitReleasePromptOutcome123●
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.
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.
The prompt that did not run
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.
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
Could this have been prevented?
The assessed controls could have limited the impact of this incident.
Incident control assessments
4Not covered
See controls by stage
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.
In hindsight · Phase 1 of 3
Pause at each phase
1 · Token and commit
4 Contained2 Not covered3 on other clouds
ContainedAWS · CodeBuild pull request build policyA pull request from outside the configured approver roles needs an authorized approval comment before CodeBuild starts its build.
Same step on other cloudsAzureGoogle CloudOracle Cloud
Not coveredGitHub token scope (source control) · No cloud-provider control reaches this stepThe scope of a GitHub token is set on GitHub when the token or the app installation is created.
ContainedAWS · GitHub App connection for CodeBuild (AWS CodeConnections)A project using the connection receives credentials within the GitHub App installation’s permissions.
ContainedGitHub · Installation access tokensA token that reaches the build is limited to the repositories and permissions the installation names, and it expires within the hour, instead of carrying the broad access of a personal token for as long as the token lives.
Not coveredsource control (GitHub branch rules and review) · No cloud-provider control reaches this stepWho may push or merge, and whether a review is required, are GitHub settings of the repository.
ContainedGitHub · RulesetsA commit made with the token lands only through a pull request that a second person approves, so a single stolen credential cannot put code on a protected branch.
1 Contained3 on other clouds
ContainedAWS · Manual approval action in AWS CodePipelineA commit that enters the release path waits for a person with the approval permission, so the release no longer includes it automatically.
3 · The prompt that did not run
3 Contained2 Not covered6 on other clouds
Not covereddeveloper machine and extension distribution · No cloud-provider control reaches this stepThe extension runs in the user's editor, and the Amazon Q CLI runs on the user's machine.
ContainedAWS · Service control policies (SCPs) · restrict destructive actions to adminsThe SCP denies the listed operations by covered member-account principals outside the approved administrator exception.
ContainedAWS · Amazon EC2 termination protectionA terminate call from a hijacked profile fails on a protected instance.
ContainedAWS · S3 Object Lock, compliance modeNo principal, the root user included, can delete a locked object version until the retention ends, so a delete of that version from any profile is refused.
Not coveredfiles on the developer machine · No cloud-provider control reaches this stepThe local deletion that the prompt asks for would be a file operation of the Amazon Q CLI on the user's machine, outside any cloud account.
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
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.
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
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
[...内容已截断,完整版请查看原文或 Wayback 快照]