分享这篇文章

Coinbase 主要 AI 编码工具被发现存在 ‘CopyPasta’ 漏洞

该技术将恶意提示隐藏在诸如 README.md 或 LICENSE.txt 等文件的 markdown 注释中。由于 AI 模型将许可信息视为权威内容,感染文本会在助手生成的新文件中被复制。

2025年9月6日 上午4:30由 AI 翻译
Hacker sitting in a room (Unsplash)

需要了解的:

  • 一种名为“CopyPasta 许可攻击”的新型漏洞针对 AI 编码助手,若未实施相应防护措施,将对如 Coinbase 等公司构成风险。
  • 该攻击将恶意提示隐藏在 markdown 注释中,使病毒能够在开发者不知情的情况下通过代码库传播。
  • 安全专家建议扫描文件中隐藏的注释,并手动审查 AI 生成的更改,以防止基于提示的攻击规模化。

一项针对 AI 编程助手的新型漏洞引发了开发者社区的广泛关注,若未建立完善的防护措施,包括加密货币交易所 Coinbase 等公司将面临潜在攻击风险。

网络安全公司 HiddenLayer 于周四披露 攻击者可以利用所谓的“CopyPasta 许可攻击”向常见的开发者文件中注入隐藏指令。

故事继续
不要错过另一个故事.今天订阅 The Protocol 新闻通讯. 查看所有新闻通讯

该漏洞主要影响 Cursor,一款由 Coinbase 工程师开发的 AI 驱动编程工具于八月表示 是团队的人工智能工具之一。据称,Cursor 被“每一位 Coinbase 工程师”使用过。

攻击原理解析

该技术利用了人工智能代码助手将许可文件视为权威指令的机制。通过在 LICENSE.txt 等文件的隐藏 markdown 注释中嵌入恶意负载,该漏洞使模型相信必须在其处理的每个文件中保留并复制这些指令。

一旦人工智能接受该“许可”为合法,它会自动将注入的代码传播到新的或已编辑的文件中,无需直接用户输入即可扩散。

这种方法绕过了传统的恶意软件检测,因为恶意命令被伪装成无害的文档,从而使病毒能够在开发者不知情的情况下传播整个代码库。

在其报告中,HiddenLayer 的研究人员展示了如何利用 Cursor 添加后门、窃取敏感数据或运行耗费资源的命令——所有这些都伪装在看似无害的项目文件中。

“注入的代码可能会设置后门,悄无声息地窃取敏感数据或篡改关键文件,”该公司表示。

Coinbase CEO Brian Armstrong 周四表示,人工智能已撰写了该交易所多达 40% 的代码,目标是在下个月达到 50%。

Loading...

然而,Armstrong 澄清称,Coinbase 的 AI 辅助编码主要集中在用户界面和非敏感后台系统,“复杂且对系统关键的系统”采用速度较慢。

“潜在恶意”

尽管如此,一种针对Coinbase首选工具的病毒的形象加剧了业界的批评。

AI 提示注入并非新鲜事物,但 CopyPasta 方法通过实现半自主传播,提升了威胁模型的复杂性。感染文件不再仅针对单个用户,而是成为传播载体,危及每一个读取它们的 AI 代理,在各个代码库间引发连锁反应。

与早期的人工智能相比 “worm” 概念如 Morris II,该病毒劫持电子邮件代理进行垃圾邮件发送或数据外泄,CopyPasta 更加隐秘,因为它利用了受信任的开发者工作流程。它无需用户批准或交互,而是嵌入到每个编码代理自然引用的文件中。

莫里斯二号因对电子邮件活动的人为检查而受限,CopyPasta则通过隐藏在开发者鲜少审查的文档中而得以蓬勃发展。

安全团队现敦促各组织对文件进行隐藏评论扫描,并手动审核所有 AI 生成的变更。

“所有进入大型语言模型(LLM)上下文的非信任数据均应视为潜在的恶意数据,” HiddenLayer 警告称,呼吁在基于提示的攻击进一步扩展之前进行系统性的检测。

(CoinDesk 已就此次攻击手法联系了 Coinbase 征求评论。)

More For You

Protocol Research: GoPlus Security

GP Basic Image

需要了解的:

  • As of October 2025, GoPlus has generated $4.7M in total revenue across its product lines. The GoPlus App is the primary revenue driver, contributing $2.5M (approx. 53%), followed by the SafeToken Protocol at $1.7M.
  • GoPlus Intelligence's Token Security API averaged 717 million monthly calls year-to-date in 2025 , with a peak of nearly 1 billion calls in February 2025. Total blockchain-level requests, including transaction simulations, averaged an additional 350 million per month.
  • Since its January 2025 launch , the $GPS token has registered over $5B in total spot volume and $10B in derivatives volume in 2025. Monthly spot volume peaked in March 2025 at over $1.1B , while derivatives volume peaked the same month at over $4B.

More For You

ZKsync Lite to Shut Down in 2026 as Matter Labs Moves On

Sunset in San Salvador. Credit: Ricky Mejia, Unsplash

The company framed the move, happening in early 2026, as a planned sunset.

需要了解的:

  • Matter Labs plans to deprecate ZKsync Lite, the first iteration of its Ethereum layer-2 network, the team said in a post on X over the weekend.
  • The company framed the move, happening in early 2026, as a planned sunset for an early proof-of-concept that helped validate their zero-knowledge rollup design choices before newer systems went live.