OpenCode Breach Exposes AI API Keys in Distillation Attack
OpenCode confirmed a breach tied to a distillation attack that may have exposed OpenAI, Anthropic and Google API keys for 1.4% of Console users. What to do now.
OpenCode, the open-source AI coding agent, confirmed on October 17 that it suffered a security breach the night before. The company said the attack was linked to a large-scale AI model distillation attack and affected 1.4% of users of its hosted Console service. Third-party API keys for OpenAI, Anthropic and Google saved in affected workspaces may have been exposed.
What happened
The attackers reached a legacy system that OpenCode said it was in the process of decommissioning. Only Console users who had linked external AI providers were affected. OpenCode emailed every affected user on October 17 under the subject line "Action Required: Potential provider key breach." The company said anyone who did not receive the email was not affected. In its public post, OpenCode wrote: "We had a security breach last night related to a large scale distillation attack that impacted 1.4% of OpenCode Console users."
What a distillation attack is
A distillation attack collects large volumes of one AI model's outputs to copy some of its behavior or capabilities. Attackers can abuse this technique by burning through stolen API keys to harvest responses, which can rack up heavy charges for the key owner. OpenCode has not explained publicly how the distillation activity connects to the unauthorized access.
What to do if you were affected
OpenCode told affected users to revoke their provider keys and create replacements, update any apps using the old keys, and check recent usage for unexpected activity. OpenCode also said it is working with Anthropic, OpenAI and Google on remediation. A follow-up email one user shared publicly says OpenAI revoked the exposed OpenAI keys and refunded any unauthorized usage. Affected users should still revoke their Anthropic and Google keys themselves.
What is still unclear
The company has not said how many accounts or keys the 1.4% figure represents, how the legacy system was accessed, when the access began, or whether exposed keys were misused. The investigation is ongoing. One boundary is clear: only the hosted Console was breached, not the OpenCode CLI or desktop apps. Co-founder Dax Raad said the breach "involves the OpenCode Console, not OpenCode itself" and that keys stored locally "never come to us." Sources: - Infosecurity Magazine - https://www.infosecurity-magazine.com/news/opencode-breach-openai-anthropic/ - DevOps.com - https://devops.com/opencode-breach-puts-spotlight-on-ai-distillation-threats - The New Way - https://www.thenewway.ai/opencode-breach-may-have-exposed-users-saved-api-keys/
