最新 微软与美国政府警告:重大技术故障还将持续 The Verge
安全与风险 ●●●●○

OpenCode 遭黑客入侵,用户 API 密钥泄露并被盗刷

Hackers hit AI coding tool OpenCode, running up charges on users' AI accounts

摘要Summary

开源 AI 编程工具 OpenCode 的在线平台 OpenCode Console 遭攻击,1.4% 用户的 API 密钥泄露,部分用户账户出现数百至上千美元未授权扣费。Anthropic、Google 封禁了相关密钥,OpenAI 退款;事件还暴露出防御方在攻击中调用前沿模型分析恶意代码时被安全过滤拦截的困境。

OpenCode, an open source AI coding agent, said attackers breached an older system behind its OpenCode Console platform, exposing API keys for 1.4% of users and triggering unauthorized charges ranging from hundreds to over $1,000 on some accounts. Anthropic and Google blocked the exposed keys and OpenAI refunded affected API customers, while the incident highlighted how safety guardrails blocked frontier models from analyzing the malicious code during the response.

  • 1.4% Console 用户 API 密钥泄露,出现未授权扣费
  • 前沿模型拒绝分析攻击代码,安全过滤被指反噬防御
  • OpenAI 开放 Daybreak Blue 权限,助其调查攻击

全文对照Full text · 中 / EN

开源 AI 编程智能体 OpenCode 周六表示,攻击者连夜入侵了一套较旧的系统,影响了其在线平台 OpenCode Console 1.4% 的用户。OpenCode 正逐渐成为 Claude Code 和 Cursor 的替代方案,在开发者中越来越受欢迎。部分用户在该平台上存储用于访问 AI 服务的 API 密钥(即数字密码)。

OpenCode , an open source AI coding agent that has been gaining ground among developers as an alternative to Claude Code and Cursor, said Saturday that attackers broke into an older system overnight, affecting 1.4% of users of its online platform, OpenCode Console, where some users store the API keys, or digital passwords, they use to access AI services.

在 OpenCode 团队努力跟上攻击节奏的同时,仓促应对也凸显出一个日益严重的问题:那些无法获得经过审核、安全限制较少的 AI 模型访问权限的公司,很难抵御大规模、AI 驱动的网络攻击。

As the OpenCode team struggled to keep pace with the attack, the scramble to respond highlighted a growing problem: Companies without vetted access to AI models with fewer safety restrictions have a hard time defending against large-scale, AI-driven cyberattacks.

该公司在 X 上写道:“我们昨晚发生了一起安全漏洞事件,与一次大规模蒸馏攻击有关,影响了 1.4% 的 OpenCode Console 用户。我们今天早上已通过电子邮件通知了所有受影响用户。”该公司表示,未收到邮件的用户未受影响。

“We had a security breach last night related to a large-scale distillation attack that impacted 1.4% of OpenCode Console users,” the company wrote on X. “We have notified them all this morning via email.” Users who did not receive an email were not impacted, the company said.

虽然该公司没有说明蒸馏攻击是如何发生的,但泄露的 API 密钥可以帮助那些对美国模型访问受限国家的用户生成该过程所需的大量输出。一些质疑者认为这种说法言过其实,称这起事件只是一次直接的数据泄露,其被用于蒸馏的说法仍未得到证实。

While the company didn’t specify how the distillation attack occurred, leaked API keys can help users in countries with restricted access to American models generate the high volume of outputs needed for that process. Some skeptics called the framing an overstretch, arguing that the incident was a straightforward breach whose use for distillation remains unproven.

一夜之间,开发者们开始在 Reddit 和 X 上发布消费提醒和未经授权的扣费信息:“我睡前看到我的 Open AI、Anthropic 和 Google AI 消费提醒全都触发了,当时还在想发生了什么,”一名开发者写道。

Overnight, developers began posting spending alerts and unauthorized charges on Reddit and X: “I saw my Open AI, Anthropic, and Google AI spend alerts all fire off before going to bed wondering what was going on,” a developer wrote .

其他用户报告称,单个账户被扣了数百美元;少数人描述总额超过 1000 美元。

Other users reported charges in the hundreds of dollars on individual accounts; a few described totals above $1,000.

Anthropic 和 Google 都封禁了它们认为已泄露的 API 密钥,而 OpenAI 表示已与 OpenCode 合作恢复访问权限,并就攻击中使用的额度向其 API 客户退款。OpenCode 表示,针对未经授权扣费的退款正在进行中。

Anthropic and Google both blocked the API keys they believed were exposed, while OpenAI said it worked with OpenCode to restore access and refund its API customers for credits used in the attack. OpenCode said refunds for unauthorized charges are underway.

泄露的密钥仅限于 Console,部分用户将其存放在工作区中。联合创始人 Dax Raad 表示,开源应用和命令行工具未受影响。他在 X 上写道:“请注意,这是 OpenCode Console,不是 OpenCode 本身,那些密钥从未传到我们这里。”

The exposed keys were confined to Console, where some users had them in workspaces. The open source app and command-line tool were not affected, according to co-founder Dax Raad. “Note this is the OpenCode Console, not OpenCode itself, those keys never come to us,” he wrote on X.

即使用户和 AI 公司着手禁用泄露的密钥,OpenCode 团队仍承受着压力。Raad 表示,攻击者已连续 48 小时不停试图入侵其系统,团队不得不让 AI 防御代理全天候运行。OpenCode 团队转而用于分析的 AI 模型起初有所帮助,但当被要求检查的恶意代码触发安全过滤器后,这些模型开始拒绝工作。

Even as users and AI companies moved to disable the exposed keys, the OpenCode team was still under pressure. Raad said attackers had been trying to break into its systems nonstop for 48 hours, requiring the team to keep AI defensive agents running around the clock. AI models that the OpenCode team turned to for analysis helped for a while, but started refusing to work when the malicious code they were asked to examine activated safety filters.

“这有点令人沮丧,”他在 X 上写道。

“[T]hat was a bit frustrating,” he wrote on X.

OpenCode 后来获得了 OpenAI 的 Daybreak Blue 计划访问权限,该计划向经过审核的用户提供不太可能拒绝防御性安全请求的 AI 模型。Raad 表示,这一权限提升了团队调查此次攻击的能力。

OpenCode later received access to OpenAI’s Daybreak Blue program, which gives vetted users AI models that are less likely to refuse requests for defensive security work. Raad said the access improved the team’s ability to investigate the attack.

OpenCode 并非第一家撞上这堵墙的公司。今年 7 月,AI 平台 Hugging Face 表示,商业 AI 模型阻止了其分析自主 AI 代理入侵活动日志的尝试;OpenAI 后来透露,这些代理是其在测试期间降低防护措施运行的自家模型。Hugging Face 在博客文章中题为“不对称问题”的一节中写道,护栏“无法区分事件响应者和攻击者”。

OpenCode isn’t the first company to hit this wall. In July, AI platform Hugging Face said commercial AI models blocked its attempts to analyze activity logs from an intrusion by autonomous AI agents, which OpenAI later revealed were its own models running with safeguards lowered during a test. In a section of its blog post titled “The asymmetry problem,” Hugging Face wrote that guardrails “cannot distinguish an incident responder from an attacker.”

安全研究人员也提出了类似抱怨,称这些限制前后不一致,并已促使一些人转向任何人都可以下载和运行的外国开放权重模型。

Security researchers have raised similar complaints , saying the restrictions are inconsistent and have pushed some toward foreign open-weight models, which anyone can download and run.

周末的这起事件引起了总统科技顾问委员会联合主席 David Sacks 的回应。

The weekend episode drew a response from David Sacks, co-chair of the President’s Council of Advisors on Science and Technology.

“OpenCode(以及更早的 Hugging Face)在攻击进行中撞上了同一堵墙:前沿模型拒绝分析防御所需的漏洞利用,因为载荷触发了安全过滤器。护栏适得其反,”他在 X 上写道。

“OpenCode (and earlier Hugging Face) hit the same wall mid-attack: frontier models refused to analyze the very exploits needed for defense because the payloads tripped safety filters. The guardrails backfired,” he wrote on X .

此次泄露发生在 OpenCode 向用户免费开放 GLM-5.3-Flash 的同一晚。更广泛的 GLM-5.3 系列已引起研究开放权重模型的研究人员关注,他们指出其网络安全能力已接近此前仅与 Anthropic 的 Claude Mythos Preview 等受限访问模型相关联的水平。

The breach occurred the same night OpenCode made GLM-5.3-Flash free for users. The broader GLM-5.3 family has drawn attention from researchers who study open-weight models and note that its cybersecurity capabilities approached levels previously associated with restricted-access models like Anthropic’s Claude Mythos Preview.

OpenCode 尚未详细说明攻击者如何访问旧系统、密钥如何存储,以及任何滥用的完整范围。它已告知受影响用户直接向各提供商撤销并更换密钥。该公司表示该事件仍在持续中。

OpenCode has not detailed how attackers gained access to the older system, how keys were stored, or the full extent of any misuse. It has told affected users to revoke and replace their keys directly with each provider. The company said the incident remains ongoing .

此次泄露发生在一系列 AI 驱动的网络事件之际。本月早些时候,网络安全公司 CrowdStrike 表示,一名中国黑客可能在对韩国银行的攻击中使用了 AI 渗透测试代理(用于探测计算机系统弱点)和 Claude。上周,印度网络安全机构警告称,AI 代理(包括一些 AI 公司正在测试的代理)已未经授权进入印度组织的系统。

The breach lands amid a run of AI-enabled cyber incidents. Earlier this month, cybersecurity firm CrowdStrike said a China-based hacker likely used an AI penetration-testing agent, which probes computer systems for weaknesses, and Claude in attacks on South Korean banks . Last week, India’s cybersecurity agency warned that AI agents, including some being tested by AI companies, had reached Indian organizations’ systems without authorization.