OpenCode hit by "distillation attack", API keys of 1.4% Console users leaked
On Oct 18, OpenCode disclosed a security breach from the previous night tied to a "large-scale model distillation attack," affecting roughly 1.4% of OpenCode Console users — those who linked external model provider accounts. The company notified affected users by email and is working with Anthropic, OpenAI and Google; the investigation is ongoing. Anyone who ever stored third-party keys in OpenCode should revoke and rotate them immediately.
Confirmed
- Attackers gained unauthorized access to a legacy system being decommissioned; third-party API keys (OpenAI, Anthropic, Google) stored in user workspaces may have leaked (@jedisct1 relaying the official notice).
- Users report actual financial losses: $400 drained on an Anthropic account (@kimmonismus), $158 wiped overnight by Opus calls (@New-Stop1494), and losses up to $1,700 per community tallies (@TheZachMueller); the total remains officially unconfirmed.
- Anthropic has revoked the affected Claude keys (@lydiahallie).
- David Ondrej published a video on the incident, with a cover showing a balance drained from $12k to zero, attributing it to a large-scale distillation attack on Anthropic and OpenAI keys; VectorWire reported such attacks can exhaust users' configured API keys.
- A forwarded post (@evilsocket) claims a security fix PR had already been written but was mistakenly closed by a bot and never merged.
- HN user bewareofscams resurfaced a 68-day-old warning that OpenCode sends user data to itself and unidentified third parties, with a GitHub issue criticizing the maintainer's dismissive responses; the direct link to this breach is unestablished (@ctjlewis, @himanshustwts).
- @TheZachMueller and others criticized the "distillation attack" framing as downplaying what was an ordinary intrusion.
- @samuelcolvin used the event to discuss supply-chain risks of hosted services and promote self-built agent infrastructure (e.g., Pydantic AI); @bibryam and others called it a wake-up call for agent security.
Unconfirmed
- The exact attack method, entry point, attacker identity and full loss picture remain undisclosed.
- A YouTube video claims three Chinese AI labs breached 1.4% of OpenCode users to steal key quota for distillation, with victims typically losing hundreds to thousands of dollars (@CompetitiveTravel16); single-source and officially unconfirmed.
- The "fix PR closed by bot" detail comes only from forwarded accounts without official confirmation.
Why it matters
- Leaked API keys cause direct financial harm, with documented losses of $158–$1,700; all past users should rotate keys now.
- The breach exposes the risk of AI coding tools centrally storing LLM credentials, renewing interest in gateway-based auth and self-hosted agent infrastructure; if the mishandled fix PR is confirmed, it also highlights fragile automation in open-source security response.
- The official "distillation attack" framing is contested as minimizing the intrusion; further disclosures merit attention.
2026-10-18 ~ 2026-10-19 · 28 related posts
Primary sources
- Anthropic revokes Claude API keys after OpenCode breach hit 1.4% of users in distillation attack — lydiahallie ·
- OpenCode breach: stored Anthropic key drained ~$158 overnight, users urged to revoke — New-Stop1494 ·
- OpenCode breach exposes provider API keys of at least 1.4% of Console users — kimmonismus ·
- OpenCode confirms breach, stolen customer API keys already incurring charges — jedisct1 · 2026-10-18
- OpenCode hacked: API keys stolen, users told to revoke; gateway egress control as defense — pjausovec · 2026-10-18
- OpenCode discloses breach from large-scale distillation attack hitting 1.4% of users — TheZachMueller · 2026-10-18
- OpenCode breach warning: rotate your keys now, details still emerging — chemist_slime · 2026-10-18
- [source] Anthropic revokes Claude API keys after OpenCode breach hit 1.4% of users in distillation attack — lydiahallie · 2026-10-18
- OpenCode credential leak sparks HN pile-on: user warned 68 days ago about data sent to third parties — himanshustwts · 2026-10-18
- HN user resurfaces 68-day-old warning alleging OpenCode leaks user data to third parties — ctjlewis · 2026-10-18
- OpenCode hacked with keys stolen, customers told to revoke credentials — samuelcolvin · 2026-10-18
- [source] OpenCode breach: stored Anthropic key drained ~$158 overnight, users urged to revoke — New-Stop1494 · 2026-10-18
- OpenCode hacked: massive distillation attack drains Anthropic and OpenAI API key balances to zero — David Ondrej · 2026-10-18
- OpenCode Breach Exposes API Keys of 1.4% Users After Distillation Attack — astrange · 2026-10-18
- Three Chinese Labs Allegedly Stole OpenCode Users' API Keys for Distillation — Competitive_Travel16 · 2026-10-18
- OpenCode breach twist: Turnstile fix PR was merged-candidate but auto-closed by bot citing AI PR flood — evilsocket · 2026-10-18
- Distillation attack on OpenCode drains users' API keys for major LLM providers — VectorWireAI · 2026-10-18
- OpenCode confirms breach with keys stolen, as experts call for AI agent security boundaries — bibryam · 2026-10-18
- OpenCode under sustained cyberattack as frontier models' guardrails refuse to help its defense — evijit · 2026-10-18
- After OpenCode API Key Theft, Check Your OpenAI/Anthropic Keys and Enforce Spend Limits — drdanielbender · 2026-10-19
11 near-duplicate retellings: thedealdirector · kimmonismus · kimmonismus · SumitGup · AGI Hunt · IanAndrewsDC · mark_k · kingslyj · MarcJSchmidt · koltregaskes · TheZachMueller