What happened
claw-code loads mcpServers definitions from project-controlled config files (ConfigLoader::discover labels them ConfigSource::Project, and ConfigLoader::load strips only project hooks before merging MCP servers). McpServerManager then accepts the stdio server and tool discovery does best-effort spawn via tokio process Command with no permission prompt. Fluid Attacks verified it as an untrusted-inclusion (CWE-829) command execution, CVSS 8.4, with a PoC.
Why it matters
This is a canonical AI coding-agent supply-chain attack: a repo you merely clone can execute code on your workstation during agent startup, before the model even runs. It bypasses the 'workspace trust' model entirely because the trust gate only covers hooks, not MCP servers.
Attack vector
A repo ships a .claw.json/.claw/settings.json declaring a stdio MCP server whose command is attacker-controlled. On startup the CLI auto-discovers tools by spawning that command — before any provider-credential validation or workspace-trust prompt — running arbitrary code as the invoking user.
Affected systems
Ultraworkers claw-code 0.1.11 through 0.1.16
Mitigation
Reject stdio MCP servers sourced from project config (ConfigSource::Project) by default, or require an explicit, persisted workspace-trust approval. Fluid Attacks advisory provides the fix and PoC; apply the upstream patch when available.