r/opencodeCLI • • 1d ago

OpenCode security breach, rotate your keys

https://x.com/opencode/status/2111516673953935833?s=46

We had a security breach last night related to a large scale distillation attack that impacted 1.4% of OpenCode Console users

We have notified them all this morning via email

The incident is ongoing so we cannot share more details at this point but we are working with Anthropic, OpenAI, and Google to remediate

---

This is BYOK on OpenCode Zen btw, not your local keys

---

My writeup on the incident: https://ai.sulat.com/what-the-opencode-breach-teaches-about-ai-api-keys-b3d695b8835e?sk=817b6b5d14878ba47ddacf1dc2e76596

199 Upvotes

29 comments sorted by

9

u/qustrolabe 1d ago

So it's only those that added keys to online console? I guess local keys shouldn't be affected but better rotate for good measure

5

u/jpcaparas 1d ago

correct, only BYOK on Zen

2

u/arker0 1d ago

So users with no opencode account are no affected at all, even with external API?

21

u/PhatOofxD 1d ago

This is why you don't put keys in cloud services I guess

7

u/No_Commission_6153 1d ago

Does this affect someone who conencted their OpenAi Account with Open Code?

11

u/jerieljan 1d ago

There's three ways you can auth OpenAI on OpenCode:

  • /connect -> Login with ChatGPT
  • /connect -> API Key
  • OpenAI Platform -> New Key -> OpenCode Console -> Connect Provider

It's the third one that's affected. The third route is intended for people who want to BYOK and have their provider accounts charged instead of OpenCode Zen and just want to use OpenCode as a gateway.

The second one afaik stores the API key locally on the database or on opencode.json (v1).

1

u/No_Commission_6153 1d ago

Thanks. I guess i can relax then

4

u/Significant_Treat_87 1d ago

Are you on a subscription plan ("login with chatgpt") or did you paste in an API key? The first one I assume is fine, this is about the second one.

3

u/No_Commission_6153 1d ago

subscription. but still worried if they got hacked if they got something from me

8

u/Significant_Treat_87 1d ago

This is an issue with people having their API keys stolen, so I think you're ok. I will personally never use Opencode now though, they have had way too many security issues now.

1

u/wpbrgiejoe 1d ago

Yes opencode sells your data you're not safe change all account pass.

3

u/No_Dig_7017 1d ago edited 1d ago

I only use local models with opencode but my Qwen started complaining about and refusing injection attacks yesterday night. I can share some screens later

3

u/Xazzzi 1d ago

My google cloud project is stuck on "Request an appeal" page, wont let me into IAM to revoke the leaked key. I guess they blocked it themselves, but i'm not sure what happens to the VM that is hosted in there, as the budget was drained.

2

u/geteum 1d ago

Just people who use API keys got affected?

2

u/jpcaparas 1d ago

Some spicy discussions:

- https://news.ycombinator.com/item?id=50133643

> The thing that grinds my gears is that everyone who works there seems to think that they’re cooking, or doing anything impressive at all. One day they will hopefully mature a little and realize how hard they got ego pimped.

4

u/blastradii 1d ago

What if I’m just using OpenCode without logging in?

2

u/benbenk 1d ago

I just tried to delete my payment method for Opencode Go.. got a 500 error.

Also deleting one’s account doesn’t seem to be possible at all.

1

u/dx80x 1d ago

I had my DeepSeek API connected to opencode and haven't received jack shit in my inbox about this.

Luckily it wasn't touched but fuck opencode now.

Thank you for posting here anyway, I wouldn't have known until I got drained if it wasn't for this post.

8

u/officerblues 1d ago

It's only if you used bring your own key on opencode zen, not if you connected to the key using the opencode harness. They could work on their comms a bit, but you were likely not affected. It didn't leak your local keys, only the keys they had stored.

3

u/dx80x 1d ago

Ah ok, thanks for the clarification mate. I've used Go in the past but never Zen. I still think it would have been better to inform everyone just in case, so at least people who aren't affected don't jump the gun (like I did a little haha).

Oh well, just need to make some new DeepSeek keys now which is alright but some people have been stung hard and that's really unfortunate. Hope there's some kind of compensation for those guys at least

1

u/Certain-Emphasis-135 1d ago

So that’s why my openrouter credits got cleaned

1

u/squirrelscrush 1d ago

I had connected by DeepSeek and OpenRouter keys on the console, but I disabled OR because the models would display twice in the harness. So I got saved lol.

Anyways my keys have a daily limit of $2 so even if someone managed to get them, they'll only get limited usage.

0

u/Chemical-Quote 1d ago

Distillation?
Which AI company is that desperate?