{"id":79469,"date":"2026-09-02T11:49:07","date_gmt":"2026-09-02T15:49:07","guid":{"rendered":"https:\/\/overcentral.com\/en\/?p=79469"},"modified":"2026-09-02T11:49:07","modified_gmt":"2026-09-02T15:49:07","slug":"gitspawn-vulnerability-ai-coding-agents-79469","status":"publish","type":"post","link":"https:\/\/overcentral.com\/en\/gitspawn-vulnerability-ai-coding-agents-79469\/","title":{"rendered":"Malicious .git Configs Hijack Claude, Codex, Cursor Run Attacker Code"},"content":{"rendered":"<p>Manifold Security has disclosed eight <a href=\"https:\/\/overcentral.com\/en\/microsoft-august-patch-tuesday\/\" title=\"Microsoft Patches 398 Security Flaws in August\" data-iacss-internal=\"1\">security flaws<\/a> across seven command-line <a href=\"https:\/\/overcentral.com\/en\/slack-ai-coding-agents-channels-77184\/\" title=\"Slack Brings AI Coding Agents to Team Chat Channels\" data-iacss-internal=\"1\">AI coding agents<\/a> in which a repository&#8217;s own Git configuration names a command that the agent runs on the developer&#8217;s machine, four of them still unpatched at publication. The command executes as the user, outside the agent&#8217;s sandbox and without an approval prompt, and exploitation requires the repository to arrive as files with its <strong>.git<\/strong> directory intact, which a shared archive, a shared drive, a sync folder, or a USB stick preserves, whereas an ordinary clone does not. Fixes have shipped for goose, Claude Code, and Cursor, while Hermes Agent, Qwen Code, Grok Build, and a second path in Claude Code were still executing repository-supplied commands when Manifold retested them on September 1. OpenAI published three CVEs of its own the same day covering the identical class in Codex, credited to three unrelated research groups.<\/p>\n<h2>How a Git Performance Setting Becomes an Attack Vector<\/h2>\n<p>At the center of these vulnerabilities is <strong>core.fsmonitor<\/strong>, a Git performance setting whose value is a command that Git runs to identify changed files. Git reads it from the repository&#8217;s own <strong>.git\/config<\/strong>. Any operation that refreshes the index, including <strong>git status<\/strong> and <strong>git diff<\/strong>, executes that command. The AI coding agents call those commands in the background to determine which branch they are on and which files have changed, leaving the repository&#8217;s configuration untouched. Exploitation is straightforward: an attacker places a malicious <strong>.git\/config<\/strong> inside a repository that arrives as a tarball, Zip archive, shared folder, or USB drive. When the agent opens the repository and triggers a Git status call, the attacker&#8217;s command runs with the user&#8217;s privileges.<\/p>\n<p>Manifold, which published the findings as GitSpawn, wrote up five of the eight in detail and said it found the pattern in more agents than it names. &#8220;The vulnerability is not in the model, or in anything new. It is in the ordinary plumbing underneath, the subprocess an agent spawns at session startup to work out where it is,&#8221; the firm said. On Claude Code and Hermes Agent, the payload fires before the workspace-trust prompt is accepted; on Qwen Code, before the user has authenticated; and on Grok Build, on the first keystroke.<\/p>\n<h2>What Is core.fsmonitor and Why Does It Enable Code Execution?<\/h2>\n<p>Core.fsmonitor is a Git configuration option that allows a repository to specify an external program to monitor the filesystem for changes. When Git runs an operation that needs to update its index, it executes the command defined in <strong>core.fsmonitor<\/strong>. Because the value is read directly from the repository&#8217;s own Git configuration, an attacker can embed any command there. The AI coding agents, in their normal operation, invoke Git commands such as <strong>git status<\/strong> or <strong>git diff<\/strong> without stripping this configuration. The command then executes on the developer&#8217;s machine, outside any sandbox, with the full privileges of the user running the agent.<\/p>\n<p>OpenAI&#8217;s advisory for Codex under <strong>CVE-2026-19592<\/strong> states: &#8220;The helper runs outside Codex&#8217;s command sandbox and without a user-approval prompt, allowing attacker-controlled code to run with the user&#8217;s privileges. The code can read, change, or delete the user&#8217;s files and access other resources available to the user&#8217;s account.&#8221;<\/p>\n<h2>Affected AI Coding Agents and Patch Status<\/h2>\n<p>Manifold Security tested each agent and confirmed the vulnerability. The following versions are affected, with fixes applied only to some as of September 1, 2026:<\/p>\n<ul>\n<li><strong>goose<\/strong> \u2013 All versions prior to 1.44.0, fixed in 1.44.0<\/li>\n<li><strong>Codex CLI<\/strong> \u2013 0.102.0 through 0.130.0, fixed in 0.131.0<\/li>\n<li><strong>Codex Desktop for macOS<\/strong> \u2013 260202.0859 through 26.513.31313, fixed in 26.519.22136<\/li>\n<li><strong>Codex Desktop for Windows<\/strong> \u2013 26.304.38 through 26.513.40821, fixed in 26.519.21041; <a href=\"https:\/\/www.microsoft.com\/\" target=\"_blank\" rel=\"noopener noreferrer\" data-iacss-external=\"1\">Microsoft<\/a> Store package 26.304.38.0 through 26.513.4821.0, fixed in 26.519.2081.0<\/li>\n<li><strong>Claude Code<\/strong> \u2013 Confirmed by Manifold on version 2.1.193 and fixed by 2.1.196 on the core.fsmonitor path; a second path through claude ultrareview confirmed live on 2.1.252<\/li>\n<li><strong>Hermes Agent<\/strong> \u2013 Versions 0.18.2 and 0.21.0 confirmed by Manifold; fix pending<\/li>\n<li><strong>Qwen Code<\/strong> \u2013 Versions 0.19.6 and 0.22.3 confirmed by Manifold; fix pending<\/li>\n<li><strong>Grok Build<\/strong> \u2013 Versions 0.2.93 and 1.0.13 confirmed by Manifold; fix pending<\/li>\n<\/ul>\n<p>In goose, the goose review command builds its Git invocations with one configuration flag, <strong>-c core.quotePath=off<\/strong>, and strips nothing else. GitHub assigned <strong>CVE-2026-72718<\/strong> a CVSS 4.0 base score of 7.0 in an advisory crediting Francisco Rosales, the only score any of these findings carries. &#8220;So running goose review inside a malicious repo runs attacker code \u2013 no submitted prompt, no model call, no tool approval, no trust prompt. The command executes before goose ever contacts the model,&#8221; the advisory said.<\/p>\n<h2>Why the Vulnerability Persists Despite Previous Fixes<\/h2>\n<p>Sonar reported the same sink in April 2026, noting that Anthropic had already moved the startup sequence once to close it. Sonar identified the same trust-dialog bypass in Visual Studio Code before version 1.63.1 (<strong>CVE-2021-43891<\/strong>) and in JetBrains IDEs before 2021.3.1 (<strong>CVE-2022-24346<\/strong>). &#8220;In version 2.0.34, Claude was updated in a way that mitigated the specific vulnerability by no longer running git status before the user approved the trust dialog. However, a related issue persisted,&#8221; Sonar said. Version 2.0.34 shipped on November 5, 2025, and Manifold reports the same startup behavior present again in 2.1.193, which shipped on June 25, 2026. Anthropic has previously disclosed pre-trust execution flaws in Claude Code, and its June advisory for <strong>CVE-2026-55607<\/strong> identifies git fsmonitor execution during worktree operations.<\/p>\n<p>The recurrence indicates that the underlying pattern \u2013 agents running Git commands that honor repository-supplied configuration \u2013 is difficult to eliminate entirely. Each agent&#8217;s codebase handles Git invocation differently, and a single missed parameter can reopen the attack path. Manifold noted that the Claude Code core.fsmonitor finding was reported on June 26 and fixed by version 2.1.196 on June 29; the report was closed as a duplicate of one filed earlier that same day. Anthropic published no advisory for it, and confirmation on September 2 found that the vendor&#8217;s published advisory record for the npm package covers neither of the Claude Code findings.<\/p>\n<h2>What Remains Unpatched: Hermes, Qwen, Grok, and a Second Claude Code Path<\/h2>\n<p>Five of Manifold&#8217;s reports came back as duplicates of findings other researchers had filed independently, one of them on the same day. The second Claude Code path, reached through claude ultrareview, turns on a different Git configuration key that Manifold has withheld. At the same time, the issue is live, and Manifold confirmed it on version 2.1.252 on September 1, against the current release 2.1.258. No source states whether subsequent releases have closed it.<\/p>\n<p>Alibaba&#8217;s security response centre accepted the Qwen Code report on July 7. Confirmation via the npm registry on September 2 showed that version 0.22.3, the version Manifold re-tested, is the latest published release. Nous Research&#8217;s Hermes Agent, which an operator ran unattended in an intrusion against a Thai government network in July, drew six contact attempts across five channels and left the private advisory untriaged, Manifold said. VulnCheck assigned <strong>CVE-2026-71963<\/strong>, according to Manifold, but no published record for that identifier appeared in MITRE&#8217;s CVE List as of September 2; identifiers on either side are published VulnCheck records.<\/p>\n<p>xAI closed an earlier report of the same class as informative on July 1, then closed Manifold&#8217;s July 14 report as a duplicate of that one. Separate research on the same 0.2.93 build of Grok Build found it uploading whole Git repositories to xAI storage, which the company addressed on X rather than through an advisory. Manifold documented the same class in Cursor CLI three weeks earlier, where a repository-supplied setup command ran before the workspace-trust prompt and outside the sandbox.<\/p>\n<h2>No Known Exploitation but Clear Warning Signs<\/h2>\n<p>No source reports exploitation of any of these findings. Checking the U.S. Cybersecurity and Infrastructure Security Agency&#8217;s Known Exploited Vulnerabilities catalog on September 2, version 2026.09.01, with 1,687 entries, showed none of the CVEs listed. However, the technique is not new: &#8220;FSMonitor abuse exploits a legitimate feature, not a bug. It leverages the intersection of Git&#8217;s flexibility and the automation of modern IDEs to turn a repository open event into code execution,&#8221; Cobalt said in a red-team writeup in December 2025. The fact that multiple independent research groups \u2013 Manifold, OpenAI&#8217;s own bounty program, Sonar, and others \u2013 converged on the same attack within months underscores how pervasive the issue has become.<\/p>\n<h2>Mitigation Guidance for Developers and Organizations<\/h2>\n<p>Users are advised to perform the following checks before opening any received directory with an AI coding agent:<\/p>\n<ul>\n<li>Inspect <strong>.git\/config<\/strong> for the presence of <strong>core.fsmonitor<\/strong>, <strong>core.hooksPath<\/strong>, and <strong>attr.tree<\/strong> alongside a clean or process filter.<\/li>\n<li>Run <strong>git config &#8211;get core.fsmonitor<\/strong> inside any repository that arrived as files, not through a standard clone.<\/li>\n<li>Run <strong>git config &#8211;global &#8211;list | grep fsmonitor<\/strong> to audit the global configuration for unexpected settings.<\/li>\n<li>Set <strong>git config &#8211;global core.fsmonitor false<\/strong> to disable the setting by default, overriding any repository-specific value.<\/li>\n<li>Vendors shipping agents should strip the configuration on background calls, for example by using <strong>git -c core.fsmonitor=false status<\/strong>.<\/li>\n<\/ul>\n<p>Codex CLI&#8217;s current release is 0.152.1 as of September 2, so installations pinned below 0.131.0 remain exposed. For organizations that rely on AI coding agents in development workflows, the practical risk is highest when repositories are exchanged via archives, USB drives, or shared network drives \u2013 exactly the channels that preserve a repository&#8217;s <strong>.git<\/strong> directory intact. A single malicious repository from a contractor, a third-party dependency archive, or even a coworker&#8217;s shared folder can trigger code execution before the developer has any opportunity to approve it.<\/p>\n<p>The Git configuration attack against <a href=\"https:\/\/overcentral.com\/en\/enterprise-ai-agents-messy-documents-77559\/\" title=\"Enterprise AI Agents Fail with Messy Documents\" data-iacss-internal=\"1\">AI agents<\/a> illustrates a broader lesson: as software development tools incorporate LLMs and automated assistants, the trusted but unexamined plumbing beneath them becomes a high-value target. Developers who once manually typed Git commands could afford to inspect repositories before opening them; an agent that automatically runs <strong>git status<\/strong> on startup removes that human step. The responsibility shifts to the tool vendors to sanitize every Git invocation, or to users to disable the vulnerable configuration globally. Neither approach is foolproof, but the stakes are clear: an attacker who can place a file on a developer&#8217;s filesystem can now, through a configuration value, hijack the very agent meant to help write secure code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Manifold Security has disclosed eight security flaws across seven command-line AI coding agents in which a repository&#8217;s own Git configuration names a command that the agent runs on the developer&#8217;s machine, four of them still unpatched at publication. The command executes as the user, outside the agent&#8217;s sandbox and without an approval prompt, and exploitation [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":83128,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/79469.png","fifu_image_alt":"Malicious .git Configs Hijack Claude, Codex, Cursor Run Attacker Code","footnotes":""},"categories":[40668],"tags":[],"class_list":["post-79469","post","type-post","status-publish","format-standard","has-post-thumbnail","category-security"],"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/79469.png","fifu_image_alt":"Malicious .git Configs Hijack Claude, Codex, Cursor Run Attacker Code","_links":{"self":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/79469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/comments?post=79469"}],"version-history":[{"count":0,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/79469\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media\/83128"}],"wp:attachment":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media?parent=79469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/categories?post=79469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/tags?post=79469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}