MikhbarMIKHBAR
Cybersecurity

OpenCode Hack Exposes API Keys in AI Distillation Attacks

OpenCode has notified a small number of users that their API keys used with external providers were exposed during a security breach involving a large-scale AI distillation attack.

OpenCode Hack Exposes API Keys in AI Distillation Attacks

Security Breach Impacts OpenCode Console Users

The open-source AI coding project OpenCode has notified some users that stored API keys they used with external providers were exposed in a security breach. According to information shared by a [project maintainer said](http://x.com/opencode/status/2111519637049319818), the security incident affected 1.4% of OpenCode Console users who had linked external providers.

OpenCode serves as a model-agnostic AI coding agent that allows users to understand code, write features, and fix bugs using natural-language instructions across a terminal, desktop application, or code editor. Developers can connect AI models from multiple external providers to the console to streamline and automate development workflows.

Large-Scale Distillation Attack Targets External Providers

On Saturday, OpenCode announced that it suffered a large distillation attack affecting developers who linked external providers such as Anthropic, OpenAI, and Google. Distillation is a legitimate machine-learning technique that [trains smaller AI models](https://www.bleepingcomputer.com/news/security/us-says-chinese-firms-extracted-billions-of-tokens-from-frontier-ai-models/) using responses generated by larger, more powerful models to create cheaper, faster alternatives that retain many of the original capabilities.

However, this technique becomes malicious when executed as an attack through unauthorized, large-scale training queries. OpenCode co-founder [Dax Raad](https://x.com/thdxr/status/2111790511409258796) [said attackers had been targeting the company's systems](https://x.com/thdxr/status/2111790511409258796) for at least 48 hours using automated AI agents.

Defensive Measures and Investigation Challenges

During the response effort, OpenCode encountered obstacles when investigating the threat actors. According to the co-founder, the AI models being utilized for the investigation began refusing requests due to built-in security safeguards.

Operations stabilized after OpenCode adopted OpenAI's Daybreak AI cybersecurity model for defensive operations, following official approval received on Saturday. The notification emails sent to affected individuals specified that the earliest potential exposure of their keys occurred on October 17, 2026, at 00:30 UTC.

Unauthorized Charges and Platform Suspensions

Following the compromise of private keys, multiple users reported unauthorized API charges and account disruptions. Individual reports highlighted overnight losses ranging from [several hundred USD](https://x.com/colinparsonscom/status/2111451256426250580) to [up to $1,700](https://x.com/sudoingx/status/2111530727330439583).

In addition to monetary losses, some developers noted that [Google suspended their projects](https://x.com/alspinu/status/2111530986567610701) after detecting abusive activity associated with hijacked resources. OpenCode communication to impacted users noted that the organization is exploring potential reimbursement options for those affected.

Ongoing Collaboration and Security Context

OpenCode confirmed it is actively collaborating with major industry partners, including Google, OpenAI, and Anthropic, to manage and investigate the security incident, though further technical details remain restricted at this time.

Security industry insights frequently highlight the risks associated with valid credentials. Data indicates that [Once attackers have valid credentials, only 37% of their actions are blocked](https://hubs.li/Q04sB3fb0), emphasizing how initial access controls often fail to stop post-compromise activity.

Sources

Continue chronologically

Related entity coverage