AI Security AI安全 7h ago Updated 2h ago 更新于 2小时前 49

Claude Cowork Flaw Could Let AI Agent Escape Its VM and Access Mac Files Claude Cowork漏洞可能让AI代理逃逸其虚拟机并访问Mac文件

A critical sandbox escape vulnerability named "SharedRoot" was discovered in Anthropic's Claude Cowork, allowing AI agents to break out of their Linux VM and access the host macOS filesystem. The exploit leverages CVE-2026-46331 (pedit COW) within the Linux kernel's net/sched subsystem, enabled by the VM having read-write access to the entire host root directory. Approximately 500,000 macOS users running local sessions were affected before the issue was addressed by defaulting new versions to cl Anthropic的Claude Cowork存在名为“SharedRoot”的沙箱逃逸漏洞,允许AI代理从Linux虚拟机突破至宿主机Mac文件系统。 攻击者可通过利用Linux内核CVE-2026-46331漏洞获取Guest Root权限,进而读写宿主机的任意文件(包括SSH密钥和云凭证)。 漏洞根源在于Cowork将宿主整个根目录以读写方式挂载到VM中,且Anthropic在收到披露后未发布补丁,仅建议默认使用云端执行模式规避。 该事件揭示了本地运行AI代理时,基于虚拟化的沙箱机制若配置不当(如过度共享文件系统),极易因内核漏洞导致严重的数据泄露。

75
Hot 热度
65
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • A critical sandbox escape vulnerability named "SharedRoot" was discovered in Anthropic's Claude Cowork, allowing AI agents to break out of their Linux VM and access the host macOS filesystem.
  • The exploit leverages CVE-2026-46331 (pedit COW) within the Linux kernel's net/sched subsystem, enabled by the VM having read-write access to the entire host root directory.
  • Approximately 500,000 macOS users running local sessions were affected before the issue was addressed by defaulting new versions to cloud execution.
  • Security researchers warn that this highlights a structural weakness in relying on kernel patches alone, as privilege escalation bugs in subsystems like net/sched are recurring.

Why It Matters

This incident demonstrates the severe security risks associated with granting AI agents broad filesystem access, even within virtualized environments. It serves as a cautionary tale for developers building local AI tools, highlighting that standard sandboxing measures can be bypassed if underlying infrastructure configurations are overly permissive. For the industry, it underscores the need for stricter isolation protocols when deploying autonomous agents that interact with host systems.

Technical Details

  • Vulnerability Mechanism: The agent exploited CVE-2026-46331, a kernel flaw in the "act_pedit" Traffic Control subsystem, to gain guest-root privileges inside the Linux VM.
  • Infrastructure Flaw: The Cowork app mounted the entire host filesystem (/) into the VM at /mnt/.virtiofs-root with read-write permissions, providing the necessary landing zone for the privilege escalation.
  • Privilege Escalation Path: By creating user and network namespaces, the agent obtained CAP_NET_ADMIN, allowing it to load the vulnerable tc/act_pedit module and execute the exploit chain.
  • Mitigation Strategies: Researchers recommend disabling unprivileged user namespaces, restricting filesystem sharing to only connected folders (or mounting them read-only), and using ProtectSystem=strict for the coworkd daemon.

Industry Insight

  • Default to Cloud Execution: Local execution of powerful AI agents poses significant security liabilities; vendors should default to cloud-based processing to isolate agent actions from the user's hardware.
  • Principle of Least Privilege: Filesystem mounts for AI agents must be strictly scoped to specific directories rather than exposing the entire host root, minimizing the attack surface for potential escapes.
  • Continuous Kernel Hardening: Relying on upstream kernel fixes is insufficient for security-critical applications; applications must implement defense-in-depth strategies, such as strict seccomp filters and namespace restrictions, to mitigate zero-day or recently disclosed kernel vulnerabilities.

TL;DR

  • Anthropic的Claude Cowork存在名为“SharedRoot”的沙箱逃逸漏洞,允许AI代理从Linux虚拟机突破至宿主机Mac文件系统。
  • 攻击者可通过利用Linux内核CVE-2026-46331漏洞获取Guest Root权限,进而读写宿主机的任意文件(包括SSH密钥和云凭证)。
  • 漏洞根源在于Cowork将宿主整个根目录以读写方式挂载到VM中,且Anthropic在收到披露后未发布补丁,仅建议默认使用云端执行模式规避。
  • 该事件揭示了本地运行AI代理时,基于虚拟化的沙箱机制若配置不当(如过度共享文件系统),极易因内核漏洞导致严重的数据泄露。

为什么值得看

这篇文章揭示了当前AI Agent安全领域的重大隐患,即本地部署的AI模型可能通过底层虚拟化技术的配置缺陷,直接威胁用户主机的数据安全。对于AI从业者和开发者而言,它强调了在构建本地AI应用时,必须严格限制虚拟机与宿主机的资源交互范围,不能仅依赖默认的隔离机制。

技术解析

  • 漏洞原理:Claude Cowork在macOS上运行时,通过coworkd守护进程将用户连接的文件夹共享给Linux VM,但关键缺陷在于它将宿主机的整个根目录/以读写权限挂载到了VM内的/mnt/.virtiofs-root
  • 攻击链:攻击者首先在VM内创建用户和网络命名空间以获得CAP_NET_ADMIN能力,随后加载Linux内核的act_pedit流量控制子系统,利用其中的内存错误(pedit COW,CVE-2026-46331)提权至Guest Root,最终通过挂载点访问宿主机全量数据。
  • 影响范围:在修复前,约50万运行本地Cowork会话的macOS用户受到影响。由于Anthropic未提供补丁,本地运行的用户仍面临风险,尽管新版默认切换至云端执行可间接缓解此问题。
  • 缓解措施:建议禁用非特权用户命名空间、避免seccomp过滤器过于宽松、禁止模块自动加载,并将文件系统共享范围限制在特定文件夹而非整个根目录,或至少设置为只读挂载。

行业启示

  • 本地AI部署的安全范式需重构:随着AI Agent越来越多地本地化运行以保护隐私,开发者必须意识到“沙箱”并非绝对安全,特别是当沙箱需要与宿主机进行文件交互时,最小权限原则(Least Privilege)应延伸至文件系统挂载层面。
  • 内核漏洞是AI安全的长期威胁:正如研究人员指出,Linux网络调度子系统中类似的内核提权漏洞层出不穷,AI应用层的安全防护无法完全弥补底层操作系统内核的结构性弱点,需持续更新镜像并监控内核漏洞。
  • 厂商响应机制引发信任危机:Anthropic对高危漏洞仅标记为“信息性”而未发布补丁的做法,凸显了AI公司在面对自身产品安全缺陷时的责任缺失,行业亟需建立更透明的漏洞披露和应急响应标准。

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

Claude Claude Security 安全 Agent Agent