OpenCode breach leaks API keys, runs up charges on user accounts

man siting facing laptop

OpenCode, the open source AI coding agent that’s gained traction as a free alternative to Claude Code and Cursor, has been hit by a breach. Hackers got into part of the platform’s online infrastructure, stole API keys from users, and ran up charges on their connected AI accounts.

What Happened

The attackers accessed a portion of OpenCode’s platform and exfiltrated API keys. With those keys in hand, they used the associated AI services at the victims’ expense. The exact scope of affected accounts has not been reported.

There’s an additional wrinkle: when the OpenCode team turned to AI tools for help analyzing the malicious code, those tools refused to examine it. That refusal slowed the response.

The Operator Takeaway

If you’re running any open source coding agent that connects to paid AI APIs, treat your API keys like passwords. Scope them tightly, rotate them after any suspected exposure, and set hard spend limits at the provider level. A compromised key with no spend cap is a blank check.

OpenCode’s situation is a reminder that open source tooling, even popular tooling, carries platform risk that commercial products don’t always publicize either.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo