Malicious .git Configs Can Make Claude, Codex, Cursor, and Other AI Agents Run Attacker Code

September 2, 2026 1 Min Read 0

Threat Intelligence Brief

Curated summary with source attribution

Source: thehackernews.com

Threat Risk: High
Victim: Software developers using AI coding agents
Incident: Discovery of RCE vulnerabilities in multiple AI coding agents via malicious .git/config files.
Impact: Full compromise of the developer’s local machine and unauthorized access to sensitive files.
Attacker: Unidentified threat actors
Analysis: The ‘GitSpawn’ vulnerabilities leverage the core.fsmonitor Git setting to achieve remote code execution (RCE). When an AI agent runs background Git commands, it inadvertently executes attacker-specified commands embedded in the repository’s configuration. This bypasses the agent’s sandbox and often triggers before users can grant workspace trust.
Recommendations: Update AI coding agents like Claude Code, Cursor, and Codex to the latest versions immediately.; Disable the fsmonitor setting globally using ‘git config –global core.fsmonitor false’.; Exercise caution when opening repositories received as file archives or via shared drives rather than standard git clones.
Source: The Hacker News

Editorial note: this post summarizes third-party reporting and links to the original source.
View Original Source

Leave a Reply

Your email address will not be published. Required fields are marked *