OpenCode hack exposes API keys amid AI distillation attacks

BleepingComputer

Source published: Site published:

Original article

  • October 19, 2026
  • 01:27 PM
  • 0

OpenCode hack exposes API keys amid AI distillation attacks

The open-source AI coding tool OpenCode has told some users that API keys they stored to connect to outside service providers were exposed in a security breach.

Several users said the breach led to charges they did not approve and the suspension of their projects in Google Cloud.

According to the project's maintainer, the breach affected 1.4% of OpenCode Console users. Some users reported more than $1,700 in charges they did not approve in a single night.

OpenCode is an AI coding tool that works with different AI models. It helps people understand code, add features, and fix bugs by following instructions written in everyday language. Users can run it in a terminal, a desktop app, or a code editor.

Users can connect AI models from different providers to OpenCode Console to make software development easier and automate tasks.

Distillation attack

On Saturday, OpenCode announced that it had suffered a large-scale AI distillation attack. The attack affected only developers who had connected outside 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 normal machine-learning method that trains smaller AI models using answers produced by more powerful models. The aim is to build models that cost less and respond faster while keeping many of the abilities of the larger models.

However, distillation becomes an attack when someone uses large numbers of unauthorized requests to train a model.

OpenCode co-founder Dax Raad said attackers had been targeting the company's systems with AI agents for at least 48 hours.

He also said OpenCode's investigation was blocked when the AI models the team was using started refusing requests because of their built-in security protections.

Distillation attack on OpenCode ran for 48 hours
The distillation attack on OpenCode lasted 48 hours
Source: Dax Raad

Raad said the situation became more stable after OpenCode started using OpenAI's Daybreak AI cybersecurity model to help defend its systems. The team received approval to use the model on Saturday.

The email sent to affected users says their keys may have been exposed as early as October 17, 2026, at 00:30 UTC. The email also says there is no sign that any data was exposed.

OpenCode said it was working with Google, OpenAI, and Anthropic to deal with the incident, but it could not share more details at that time.

OpenCode notice to users
OpenCode's notice to users
Source: Alex Spinu

Users reported unauthorized charges after their private API keys were exposed. The reported amounts ranged from several hundred US dollars to as much as $1,700. OpenCode's message to affected users said they might be able to get their money back.

Some users said Google suspended their projects after detecting “abusive activity consistent with hijacked resources.”

BleepingComputer contacted OpenCode to ask for more details, but had not received a response by the time this article was published.