OpenCode Breach Exposes Third-Party API Keys, Linked to AI Distillation Attack
OpenCode has reported a security breach exposing third-party API keys for some of its Console users, potentially connected to a large-scale AI model distillation attack.

OpenCode has disclosed a security breach affecting approximately 1.4% of its Console users, warning that third-party API keys stored within affected workspaces may have been exposed. The company, in a statement released on October 17, indicated that the incident is potentially linked to a large-scale distillation attack and that it is collaborating with AI providers such as Anthropic, OpenAI, and Google to address the situation. The breach specifically impacted users who had integrated external providers into their OpenCode Console workspaces. OpenCode has stated that all affected users have been notified via email, and those who did not receive such a notification are not believed to be impacted.
The unauthorized access was gained to a legacy system that OpenCode was already in the process of decommissioning. Within this legacy system, third-party API keys for services like OpenAI and Anthropic, which users had stored in their workspaces, may have been compromised. Affected users have been instructed to immediately revoke and replace these API keys through their respective provider dashboards, update any applications that rely on these keys, and closely monitor their accounts for any suspicious activity. The company's advisory emphasizes the *possible* exposure of these keys, rather than confirming that every compromised key was indeed stolen or misused.
Details regarding the initial entry vector, the duration of the unauthorized access, or the precise number of exposed keys remain undisclosed by OpenCode. The company has not publicly attributed the breach to a specific threat actor or provided technical evidence directly linking the exposed credentials to the reported AI model distillation activity. Distillation, in the context of AI, involves training a new model by leveraging the outputs of a pre-existing, often proprietary, model. Attackers can exploit this process to illicitly gather large volumes of model responses.
While cybersecurity news outlets have previously reported on the risks associated with large-scale AI distillation attacks, including warnings from Anthropic about such campaigns, OpenCode has not yet clarified whether the compromised API keys were utilized to facilitate these unauthorized requests. The company's current statement establishes a potential connection between the breach and distillation activities but does not offer a comprehensive account of the attack's mechanics or confirm any financial losses.
This incident underscores the broader security risks associated with exposed credentials, a concern highlighted in previous analyses of API keys found in publicly accessible web data. While those cases illustrate the critical importance of secure credential storage and timely revocation, they do not necessarily indicate a shared threat actor or methodology with the OpenCode breach.
For users who received a notification from OpenCode, the immediate priority is to follow the recommended steps for key replacement. This includes reviewing recent activity and billing records associated with the exposed API keys to identify any anomalies or unauthorized usage. Updating all dependent applications is also a crucial step to ensure continued functionality and security.
At the time of its statement, OpenCode indicated that the incident was ongoing and that further details could not be shared. A more comprehensive technical report detailing the initial access point, the full scope of credential exposure, and confirmation of whether unauthorized AI model requests occurred would provide greater clarity and aid in understanding the full impact of this security incident.