AI News AI资讯 8h ago Updated 3h ago 更新于 3小时前 55

Claude, Codex, and Hermes installed unowned code inside corporate networks Claude、Codex 和 Hermes 在企业网络中安装未授权代码

AI coding agents are automatically executing malicious code from llms.txt and llms-full.txt files on over 100 websites, including those of Fortune 500 companies and defense contractors Researchers at an Israeli stealth startup discovered 120 misconfigured LLM files containing 227 commands pointing to unregistered packages or domains, with proof-of-concept code triggering phone-home responses from major companies within an hour The vulnerability exploits the fundamental trust model where AI agent 超过100个网站的llms.txt/llms-full.txt文件中引用了未注册的代码包或域名,AI代理访问时会自动执行安装指令 以色列研究人员扫描6,214个企业域名后发现,Fortune 500公司和科技巨头的编码代理(Claude、Codex、Hermes)会无条件信任并执行这些文档中的命令 至少一个活跃攻击已利用此漏洞,clerk.com网站上的llms.txt文件被恶意利用,攻击者注册了未使用的包名并托管实时恶意软件 该漏洞揭示了AI代理无法区分"数据"与"指令"的根本性缺陷,整个公开数据语料已 silently 成为执行表面

85
Hot 热度
72
Quality 质量
78
Impact 影响力

Analysis 深度分析

TL;DR

  • AI coding agents are automatically executing malicious code from llms.txt and llms-full.txt files on over 100 websites, including those of Fortune 500 companies and defense contractors
  • Researchers at an Israeli stealth startup discovered 120 misconfigured LLM files containing 227 commands pointing to unregistered packages or domains, with proof-of-concept code triggering phone-home responses from major companies within an hour
  • The vulnerability exploits the fundamental trust model where AI agents treat vendor documentation as authoritative ground truth without questioning executable instructions embedded in retrieved content
  • An active attack was already exploiting this flaw on clerk.com, where a malicious package was hosted under a claimed domain name, demonstrating this is not merely theoretical
  • The attack vector highlights the collapsing boundary between data and code, as agents cannot distinguish between legitimate documentation and executable commands from untrusted third-party sources

Why It Matters

This vulnerability exposes a critical security gap in the rapidly expanding agentic AI ecosystem, where coding agents like Claude, OpenAI's Codex, and Hermes are increasingly deployed across enterprise environments with shell execution permissions. The fact that Fortune 500 companies and defense contractors are being compromised through standard documentation files demonstrates that current security controls are fundamentally inadequate for protecting AI agents from supply-chain attacks embedded in web content.

Technical Details

  • Attack Vector: llms.txt and llms-full.txt files, which serve as AI-equivalent to robots.txt for machine-readable site summaries, contain malicious pip install, npm install, and npx commands pointing to unregistered or attacker-controlled packages and domains
  • Research Methodology: Researchers scanned 6,214 live domains from defense contractors, Fortune 500, and Big Tech companies, discovering 8,265 LLM files, of which 120 contained references to non-existent packages or domains; they registered unclaimed names and hosted beacon packages to test agent behavior
  • Affected Agents: Coding agents including Claude (Anthropic), OpenAI's Codex, and Nous Research's Hermes were identified as executing the malicious commands, with parent process chains confirming agent involvement
  • Active Exploit: The clerk.com website contained an llms.txt file with "npx clerk-next-fix-auth-protection," which attackers claimed and used to host live malware; npx executes packages without adding them to dependency manifests, making detection difficult
  • Root Cause: The vulnerability stems from agents treating all retrieved content as authoritative instructions, with no integrity guarantees on published web data, and security controls failing to flag commands embedded in HTTPS-served, standardized-format documentation files

Industry Insight

  • Organizations deploying AI coding agents must implement strict content authentication and command validation layers that distinguish between documentation and executable instructions, as current guardrails do not cover the expanded supply-chain attack surface created by agentic AI
  • Security teams should audit llms.txt and llms-full.txt files across their technology stack and vendor documentation for any installation commands or external references, and consider sandboxing agent execution environments to prevent unauthorized package installations
  • The AI industry needs to establish integrity guarantees for machine-readable documentation standards, potentially through cryptographic signing or verified package registries, as the convergence of AI agents with web content consumption creates unprecedented prompt injection vectors at scale

TL;DR

  • 超过100个网站的llms.txt/llms-full.txt文件中引用了未注册的代码包或域名,AI代理访问时会自动执行安装指令
  • 以色列研究人员扫描6,214个企业域名后发现,Fortune 500公司和科技巨头的编码代理(Claude、Codex、Hermes)会无条件信任并执行这些文档中的命令
  • 至少一个活跃攻击已利用此漏洞,clerk.com网站上的llms.txt文件被恶意利用,攻击者注册了未使用的包名并托管实时恶意软件
  • 该漏洞揭示了AI代理无法区分"数据"与"指令"的根本性缺陷,整个公开数据语料已 silently 成为执行表面

为什么值得看

这篇报道揭示了一个新兴的AI供应链攻击向量,随着Agentic AI在企业中的快速普及,llms.txt等机器可读文档正成为新的攻击面。对AI从业者和企业安全团队而言,这提醒我们需要重新审视AI代理的信任模型和输入验证机制。

技术解析

  • 攻击载体:llms.txt和llms-full.txt文件,这是网站用于提供机器可读内容摘要的新兴约定,类似于robots.txt但面向AI代理
  • 漏洞原理:文件中引用了PyPI、npm等注册表中未注册的包名或域名,攻击者可以注册这些未使用的名称并托管恶意代码
  • 执行机制:当具有shell命令执行权限的编码代理访问这些文件时,会将文档内容视为权威安装说明,自动下载并执行恶意包
  • 实际案例:clerk.com网站的llms.txt文件包含"npx clerk-next-fix-auth-protection"指令,攻击者注册了该未使用的包名并托管了恶意软件
  • 受影响代理:Claude、OpenAI的Codex、Nous Research的Hermes等编码代理均被证实会执行此类指令

行业启示

  • 信任模型需要重构:AI代理不应无条件信任第三方文档,需要建立类似代码签名和内容验证的机制
  • 供应链安全边界扩展:随着AI代理渗透到SaaS、云和端点各层,传统的供应链安全防护已不足以覆盖新的攻击面
  • 数据与指令边界模糊化:LLM无法可靠区分用户直接输入的指令和从不可信第三方来源获取的内容,这是prompt injection攻击的根本原因,需要开发更完善的guardrail机制

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Claude Claude Agent Agent Security 安全 Code Generation 代码生成 LLM 大模型