Hackers hit AI coding tool OpenCode, running up charges on users’ AI accounts
A cyberattack on an old system of OpenCode, a popular AI coding tool, has affected 1.4 percent of the platform's users. Some users allege that their API keys were stolen and used to gain unauthorised access to AI services from OpenAI, Anthropic and Google, running up charges. A few users say their bills have exceeded $1,000.
According to a report by technology outlet TechCrunch, OpenCode disclosed the attack last Saturday. The company suspects the incident may be linked to a large-scale attempt at AI model distillation, a method in which the outputs of one AI model are used to train another. However, it is still unclear whether distillation was the motive. Some of those involved believe it could also be an ordinary security breach.
OpenCode co-founder Dax Raad said only the OpenCode console was affected. The company's open-source app and command-line tool were not hit. Users' saved API keys in the console may have been leaked, he said. While the keys could be used to access third-party AI services, they did not go directly to OpenCode's core app.
After the attack, Anthropic and Google disabled the suspected leaked API keys. OpenAI also worked with OpenCode to restore services and has moved to refund the credits used in the attack. OpenCode has likewise begun refunding the unauthorised charges.
According to Raad, the attackers tried to break into the system continuously for 48 hours. The company used AI agents for security analysis in response. However, when asked to examine the malicious code, several AI models refused to continue the analysis because of their safety guardrails. OpenCode was later given access to AI models suited to security research under OpenAI's Daybreak Blue programme.
The incident highlights a significant limitation of using AI in cybersecurity. To detect and prevent attacks, security experts often need to examine malicious code, but the safety systems of AI models can obstruct that very analysis. AI platform Hugging Face had earlier reported a similar problem.
So far, the company has not disclosed exactly how the attackers broke into OpenCode's old system, how many API keys were leaked, or how many were misused. The investigation is continuing. Affected users have been advised to go to the relevant AI service provider's platform, revoke their old API keys and generate new ones.
Leave A Comment