AI Security
OpenCode breach exposes API keys, forcing major AI companies to block stolen credentials
An attack on the coding platform's console system compromised API credentials for OpenAI, Anthropic, and Google, leaving some users facing unauthorized charges in the hundreds of dollars.
TechCrunch — AI
Developers using OpenCode, an increasingly popular open-source AI coding assistant, discovered unauthorized charges to their AI service accounts over the weekend after attackers breached an older company system. The incident affected roughly 1.4% of OpenCode Console users—a web-based platform where some developers store API keys, the digital credentials needed to access services from OpenAI, Anthropic, and Google.
Spending alerts started flooding in as hackers leveraged the stolen keys to run queries across multiple AI providers. One developer reported seeing alerts from OpenAI, Anthropic, and Google simultaneously, while others documented charges ranging from hundreds to over $1,000 on individual accounts.
How the breach unfolded#
The OpenCode team confirmed the intrusion on Saturday morning and said attackers had been testing their systems continuously for 48 hours. The company framed the incident as stemming from a "large-scale distillation attack"—a technique where compromised API keys enable high-volume generation of AI outputs, potentially useful for training competing models, particularly in regions where access to Western AI models is restricted. However, some security observers questioned whether distillation was actually the primary motive, suggesting a simpler credential theft scenario.
Critically, OpenCode's co-founder emphasized that the breach was limited to the Console web platform; the open-source codebase and command-line tool remained unaffected. "Those keys never come to us," he clarified, noting that the exposed credentials belonged to users who had chosen to store them within Console workspaces.
AI companies respond and defensive chaos#
Anthropic and Google immediately revoked the exposed API keys, blocking further unauthorized access. OpenAI went further, working directly with OpenCode to restore service and compensate affected customers for the fraudulent charges. OpenCode said refunds for unauthorized expenses were already underway.
Yet the response revealed a troubling dynamic: as OpenCode's team scrambled to investigate and defend against ongoing attacks, they found that standard AI models—the very tools they'd normally turn to for security analysis—actively refused to help. When engineers fed malicious code samples to leading AI systems for examination, safety filters kicked in and blocked the analysis. It was only after OpenCode gained access to OpenAI's Daybreak Blue program—which provides vetted security researchers with less-restricted model access—that the team could effectively investigate.
