AI Coding Agents Exposed to Code Execution via Malicious Git Config Files
Popular AI coding agents such as Claude Code, Codex, and Cursor automatically run Git commands at startup to assess repository state, a convenience feature that introduces a serious security gap. Attackers can embed malicious Git configuration settings — such as a crafted core.fsmonitor directive — inside a shared or archived repository's .git folder to trigger arbitrary code execution without any user interaction. The attack requires no phishing or social engineering; simply sharing a zip file or archived project with an intact .git directory is enough to exploit the flaw. Security researchers note this is not a new vulnerability class — Git config injection has been documented for years — but AI agents dramatically expand the blast radius by acting autonomously before a user types a single command. Developers and teams building or evaluating AI coding tools are urged to sandbox all agent-initiated commands and to stop treating archived repositories as inert files.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in