GitSpawn Lets Malicious Git Configs Execute Code Through AI Coding Agents
Emerging Technology Risk · 6 sources · Updated 2mo ago · First seen Sep 2, 2026

Manifold Security disclosed GitSpawn, a vulnerability class in which AI coding agents automatically invoke Git commands such as git status or git diff while opening a repository, causing attacker-controlled core.fsmonitor commands in the repository’s .git/config to execute. The commands run with the developer’s local user privileges, outside the agent sandbox and before trust or approval controls may apply, enabling code execution without a build step or explicit user action. The technique extends a previously demonstrated abuse of Git’s legitimate FSMonitor feature, which can also trigger when IDEs such as VS Code or Cursor inspect a malicious repository.
Affected products reportedly included goose, OpenAI Codex, Claude Code, Hermes Agent, Qwen Code, Grok Build, and Cursor. Patches were available for goose, Codex, Cursor, and one Claude Code path, while Hermes Agent, Qwen Code, Grok Build, and another Claude Code issue remained unresolved or unpatched. The primary exposure is repositories delivered locally with a preserved .git directory, including ZIP archives; ordinary cloning, pulling, and fetching do not transfer the malicious local configuration. Organizations should treat locally received repositories as untrusted, audit for suspicious core.fsmonitor settings, disable FSMonitor by default where feasible, and update affected agent tools.


