OpenCode hack exposes API keys amid AI distillation attacks
- October 19, 2026
- 01:27 PM
- 0

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.
Multiple users reported that the incident led to unauthorized API charges and suspended projects in Google Cloud.
According to the project maintainer, the breach affected 1.4% of OpenCode Console users, with some reporting more than $1,700 in unauthorized charges overnight.
OpenCode is a model-agnostic AI coding agent that helps users understand code, write features, and fix bugs using natural-language instructions, through a terminal, desktop app, or code editor.
Users can connect AI models from multiple AI providers to the OpenCode console to streamline and automate the development process.
Distillation attack
On Saturday, OpenCode announced that it suffered a large distillation attack that impacted only developers who linked external providers, including Anthropic, OpenAI, and Google.
“We had a security breach last night related to a large-scale distillation attack that impacted 1.4% of OpenCode Console users,” the project maintainer said.
“We have notified them all this morning via email. If you did not get an email, you were not impacted, it was a subset of users who had external providers linked.”
Distillation is a legitimate machine-learning technique that trains smaller AI models using responses generated by more powerful models. The goal is to create cheaper, faster models that retain many of the capabilities of their larger counterparts.
However, the technique becomes an attack when it involves large-scale training through unauthorized queries.
OpenCode co-founder Dax Raad said attackers had been targeting the company's systems for at least 48 hours using AI agents.
He also said OpenCode's investigation of the attackers were blocked when the AI models it was using began refusing requests due to built-in security safeguards.
Distillation attack on OpenCode ran for 48 hourssource: Dax Raad
Raad said the situation stabilized after OpenCode began using OpenAI’s Daybreak AI cybersecurity model for defensive work, which it was approved to use on Saturday.
The email sent to impacted users notes that the earliest possible exposure of the users’ keys was on October 17, 2026, 00:30 UTC, and that no data appears to have been exposed.
OpenCode also said it was working with Google, OpenAI, and Anthropic to address the incident but could not share further details at this time.
OpenCode notice to usersSource: Alex Spinu
User reports claim rogue charges following the private key leaks, ranging from several hundred USD to up to $1,700. OpenCode’s message to impacted users mentions the possibility of reimbursement for those impacted.
Some users reported that Google suspended their projects after detecting "abusive activity consistent with hijacked resources.”
BleepingComputer contacted OpenCode for more details, but we have not heard back as of publication.
.article-callout { background-color: #f0f6ff; width: 95%; max-width: 800px; margin: 15px auto; border-radius: 8px; border: 1px solid #d6ddee; display: flex; align-items: stretch; overflow: hidden; } .article-media { flex: 1; max-width: 220px; display: flex; } .article-media a { display: flex; width: 100%; height: 100%; } .article-media img { width: 100%; height: 100%; border-radius: 8px 0 0 8px; display: block; } .article-callout .article-media img { margin-top: 0 !important; height: 100% !important; } .article-body { flex: 2; padding: 10px; display: flex; flex-direction: column; justify-content: center; } .article-body h2 { font-size: 17px !important; font-weight: 700; color: #333; line-height: 1.4; font-family: Georgia, "Times New Roman", Times, serif; margin: 0 0 14px 0; } .article-body p { font-weight: bold; font-size: 14px; margin: 0 0 clamp(6px, 2vw, 14px) 0; } .article-link { background-color: #fff; border: 1px solid #3b59aa; color: black; text-align: center; text-decoration: none; border-radius: 8px; display: inline-block; font-size: 16px; font-weight: bold; padding: 10px 20px; width: fit-content; } @media (max-width: 600px) { .article-callout { flex-direction: column; align-items: center; } .article-media { max-width: 100%; } .article-media img { border-radius: 8px 8px 0 0; } .article-body { padding: 15px; width: 100%; } .article-link { width: 100%; margin: 0 auto; box-sizing: border-box; } }
Once attackers have valid credentials, only 37% of their actions are blocked
Overall prevention scores can hide what happens after initial access. Once attackers are using valid credentials, prevention drops sharply.
The Blue Report 2026 measures defenses technique by technique across 338 million simulations run in customer production environments.
Get the reportRelated Articles:
Automated AI agent used to breach cybersecurity nonprofit DIVD
Anthropic warns self-replicating AI could spread to your smart devices
Anthropic takes risky AI tests offline after models breach govt sites
VirusTotal AI code analysis expands Windows, Linux script support
ARTEX AI, Claude agents used in cyberattacks on South Korean banks
Was this article helpful?