Malicious code inserted into Amazon Q AI assistant GitHub repository
A threat actor exploited excessive permissions on an AWS CodeBuild token to inject malicious code into the GitHub repository for Amazon Q Developer, a coding assistant extension. The code was distributed in nearly a million downloads but failed to execute due to a syntax error, averting what could have been a major supply chain attack.
What happened
A threat actor inserted malicious code into the GitHub repository for Amazon Q Developer for Visual Studio Code Extension by exploiting an overly-permissioned GitHub token in AWS CodeBuild configuration.
The malicious code was automatically included in a public release of the extension and downloaded nearly a million times. However, the code failed to execute due to a syntax error, preventing it from making changes to any services or customer environments.
Reported impact
No actual impact was recorded. Had the malicious code executed properly, it reportedly would have attempted to delete local data, cloud data, and logs of its own actions on affected developer systems and connected AWS accounts.
Index analysis
The incident demonstrates a supply chain vulnerability in which compromised developer tools can be used to distribute malicious code to downstream users. Security experts compared the incident to the 2021 SolarWinds attack, noting that compromised development workflows can enable attackers to insert code into software distributed to a broad user base.
Governance controls
AWS discovered the malicious code and determined it was unsuccessful in executing due to a syntax error. Public Citizen noted the incident highlights the need for enforceable safety standards, mandatory safety reviews, independent audits, and public accountability for AI products before market release.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.