Kamil Józwik
← All posts

Claude Cowork Shows VM Sandboxes Alone Cannot Stop Prompt Injection

On January 12, Anthropic launched Claude Cowork as a research preview inside the Claude Desktop app on macOS. Billed as bringing Claude Code’s agentic workflow to everyday knowledge work, Cowork lets you point Claude at a local folder so it can read documents, organize files, build spreadsheets, and browse the web on your behalf.

As Simon Willison wrote on launch day, Claude Code was always a general computer-use agent disguised as a developer CLI. Cowork strips away the terminal requirement and mounts your chosen folders inside a containerized Linux environment (/sessions/.../mnt/...) so non-developers can delegate multi-step tasks without touching bash.

Within 48 hours of release, though, security researchers showed why wrapping an LLM in a macOS VM still leaves a wide gap between operating-system isolation and data security.

Why Cowork’s architecture looked solid at first glance

From a systems perspective, Anthropic clearly learned from earlier local-agent missteps. Instead of letting Claude run shell commands directly against your macOS home directory, Cowork operates inside a local virtual machine with two real guardrails:

  • Scoped folder mounts: Claude only sees the directories you explicitly attach to the session.
  • Outbound network allowlisting: Arbitrary internet egress is blocked by default so an agent cannot freely curl your files to a random attacker server.

For traditional remote code execution, that setup works well. Even if an agent runs messy scripts inside the VM, your broader host OS stays isolated.

How PromptArmor exfiltrated local files anyway

Two days later, PromptArmor demonstrated a clean bypass that Simon Willison highlighted right away. Cowork blocks arbitrary outbound hosts, yet it has to whitelist Anthropic’s own API domain (api.anthropic.com).

PromptArmor embedded hidden prompt-injection instructions inside a document placed in a mounted folder. When Cowork read that file, the injected instructions directed Claude to package sensitive local files from the session folder and upload them to https://api.anthropic.com/v1/files using the attacker’s own Anthropic API key. Once uploaded, the attacker could pull the files straight out of their Anthropic account.

The attack needed no VM escape and never touched a blocked domain. The agent simply misused a trusted, allowlisted tool endpoint because language models still cannot reliably separate instructions from untrusted file content.

Do not push prompt-injection defense onto users

This echoes the lesson from the GTG-1002 disclosure back in November: model-level judgment breaks down whenever untrusted context enters an autonomous loop.

What bothered me most about the Cowork launch was Anthropic’s documentation advising users to watch for suspicious actions that might indicate prompt injection and avoid granting access to sensitive files. That is fine print masquerading as security. Non-technical knowledge workers (the exact audience Cowork targets) cannot audit find commands or spot encoded API payloads mid-task, and even senior engineers miss clever indirect injections tucked inside a 40-page PDF or downloaded skill file.

Notice also how cleanly Anthropic’s Bun acquisition connects to this rollout: shipping fast local agent workflows relies on tight runtime packaging, yet packaging speed continues to outpace our security primitives.

What builders need to change for desktop agents

If your team is building local file agents or desktop assistants, Cowork’s first week offers three clear engineering rules:

  1. Treat trusted API endpoints as exfiltration channels. Allowlisting your own vendor API domain fails to prevent data theft if an attacker can supply their own credentials inside an injected payload. Outbound requests to vendor APIs must be pinned to the authenticated user’s session identity at the proxy layer, never controlled by arbitrary arguments inside the sandbox.
  2. Enforce read/write separation on untrusted content. When an agent ingests external files (downloaded invoices, third-party Markdown specs, shared repos), drop outbound write capabilities or require deterministic user confirmation before any file leaves the sandbox.
  3. Assume the VM protects the host, not the mounted data. Containerization stops host tampering, yet the agent can still read, delete, or upload anything inside the mounted directory.

Cowork is genuinely useful when pointed at clean, low-risk scratch folders. Until desktop agents enforce identity-pinned egress and strict capability boundaries around untrusted inputs, treat any mounted directory as readable by every document inside it.