OpenCode breach may have exposed API keys Console users stored in their workspaces
OpenCode said an intruder gained access to a legacy system, possibly exposing API keys stored by 1.4 per cent of users of its Console service. The company is urging users to revoke the keys, and some users on Reddit report charges they did not run up themselves.
The developer of OpenCode, an open-source coding agent, disclosed a data breach on 17 October. The breach may have exposed third-party API keys that users had stored in their workspaces. The company said the breach affected 1.4 per cent of OpenCode Console users. Cybersecurity News points out that the figure refers to Console users, not the entire OpenCode user base.
OpenCode runs in the terminal, as a desktop app and in development environments. Developers can connect their own keys to it and use models from Anthropic, OpenAI or Google, for example. Security company Cyera describes Console as a web service run by OpenCode, where teams share models in a common workspace, set budgets and connect their own providers. An API key is an identifier that lets an application use a provider’s model. Anyone who holds the key can therefore send requests to the model, and the key’s owner is billed for them.
OpenCode sent users an email, which Notebookcheck and Cybersecurity News have summarised. The email said someone had gained unauthorised access to a legacy system that the company was already shutting down. Keys stored in workspaces, including OpenAI and Anthropic keys, may have been exposed. Cybersecurity News notes that the message speaks of possible exposure and does not confirm that every key was stolen or used. Cyera said OpenCode has not yet been able to confirm whether the keys were misused.
In a statement posted on X, OpenCode linked the incident to a large-scale distillation attack. Distillation trains one model on responses generated by another. Done without permission, it takes an enormous number of queries. The company has not said whether the queries were made with the leaked keys, how the intruder got into the system or how many keys were affected. Cyera noted that in September Anthropic described campaigns by Chinese AI labs that pulled roughly 190 million exchanges from Claude, partly through illegally obtained API keys. Cyera stresses that the OpenCode incident has not been publicly attributed to anyone.
OpenCode says it is working with Anthropic, OpenAI and Google. The company said it has emailed everyone affected, and users who did not receive a message are not affected. It said its handling of the incident was still ongoing and it could not share more.
Notebookcheck summarised a Reddit discussion in which users describe unexpected costs. One user reported $400 in unauthorised charges on an Anthropic account. Another said Google usage charges had risen to around €200 and their project had been suspended for abuse. These are users’ own reports and have not been verified.
OpenCode is asking users to revoke their keys and create new ones in each provider’s own dashboard, update the applications that use the keys and check recent usage. Cyera adds that deleting a key from OpenCode does not stop anyone from using a copy they have already taken. Users should go to the dashboard directly rather than through a link in an email, because phishing messages often imitate breach notifications. Cyera also advises checking usage from 16 October onwards and setting spending caps. Budgets set in Console do not limit usage if someone uses a stolen key directly through the provider. Revoking a key stops the applications that use it from working. Even so, Cyera says keys that OpenCode has flagged must be revoked immediately. If you are rotating a key purely as a precaution, deploy the new key everywhere before revoking the old one.
What this means: The keys that may have leaked were not in the open-source agent itself but in Console, the web service OpenCode runs, where users had stored them in their workspaces. This suggests that when you choose a coding agent, being open source does not by itself tell you how risky it is. It also matters whether the service stores keys on the user’s behalf, because in that case whether you end up paying for other people’s requests also depends on the service’s own systems – here, a legacy system that OpenCode was already shutting down.