OpenCode Breach Exposed OpenAI And Anthropic API Keys In Suspected Distillation Attack

OpenCode says a breach of a legacy system on October 17. exposed API keys for OpenAI, Anthropic, and Google stored in Console users’ workspaces.

Published on Oct 19, 2026
OpenCode Breach Exposed OpenAI And Anthropic API Keys In Suspected Distillation Attack

Open-source AI platform, OpenCode, fell victim to a breach on 17 Oct. The attack affected 1.4% of OpenCode Console users, who have all been contacted via email to make them aware of the breach. The attack seems to have affected Console users, rather than anyone who uses the browser version.

OpenCode is an open-source, model-agnostic AI coding agent that runs in a user’s terminal, desktop app, or IDE extensions. It’s used to help write, plan, and debug code. Many users opt for OpenCode as it offers complete model freedom, open-source transparency, and lower cost flexibility. 

A distillation attack is where a cheaper AI is trained on the answers provided by a more accomplished model. In this case, the stolen key would be used to ask the better AI model questions, with the answers then being fed into the cheaper copy. 

In response to the breach, OpenCode has emailed all affected users. The communication explained that there may have been “unauthorized access to a legacy system that [OpenCode] was in the process of decommissioning. Third party provider keys (eg OpenAI, Anthropic) saved in your workspace may have been exposed.”

Unfortunately, some users were able to identify the attack before the announcement was made, thanks to seeing unexpected costs:

OpenCode released its statement on Oct. 17, stating that the breach was ongoing and that they were working alongside Anthropic, OpenAI, and Google to remediate the issues. OpenCode have not offered any further updates since then. 

Remediation Response

Any affected users should follow the advice provided by OpenCode: revoke API keys and generate new ones, ensuring that they’re updated across applications using them. Users should also “review recent usage for unexpected activity.”

While not being a means of preventing the attack, Adding spend limits to API accounts would limit the financial impact of similar attacks.

This field is for validation purposes and should be left unchanged.

FREE NEWSLETTER

Cyber Weekly

Get curated cybersecurity news, threats and insights delivered free every Thursday.

Written By Written By
Alex Zawalnyski
Alex Zawalnyski Journalist & Content Editor

Alex is an experienced journalist and content editor. He researches, writes, factchecks and edits articles relating to B2B cyber security and technology solutions, working alongside software experts.

Alex was awarded a First Class MA (Hons) in English and Scottish Literature by the University of Edinburgh.