{"id":23743,"date":"2026-09-02T14:06:00","date_gmt":"2026-09-02T14:06:00","guid":{"rendered":"https:\/\/scannn.com\/malicious-git-configs-can-make-claude-codex-cursor-and-other-ai-agents-run-attacker-code\/"},"modified":"2026-09-02T14:06:00","modified_gmt":"2026-09-02T14:06:00","slug":"malicious-git-configs-can-make-claude-codex-cursor-and-other-ai-agents-run-attacker-code","status":"publish","type":"post","link":"https:\/\/scannn.com\/lv\/malicious-git-configs-can-make-claude-codex-cursor-and-other-ai-agents-run-attacker-code\/","title":{"rendered":"Malicious .git Configs Can Make Claude, Codex, Cursor, and Other AI Agents Run Attacker Code"},"content":{"rendered":"\n<div id=\"articlebody\">\n<div class=\"separator\" style=\"clear: both;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhlrspu4otI5zjtu2q78NDrwnqfbTv4jzqXhH-txAo8pCjXDPRJjLvfWpRyHvbimqVvAOZWI0pMVmu2jWVdETbh2csa2UkMHx0M2uu9cJkB0_E4x1mjjs_1F9RYZjozZQvIYN5Xux43DX1u0jCQE_Pk19yE8BnR_RxXN-QXmP5jf74ZQgE9uQVUONJoQKQ\/s1600\/aix.gif\" style=\"display: block; padding: 1em 0; text-align: center; clear: left; float: left;\"><\/a><\/div>\n<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.<\/p>\n<p>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\u00a0.git\u00a0directory intact, which a shared archive, a shared drive, a sync folder, or a USB stick preserves, whereas an ordinary clone does not.<\/p>\n<p>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.<\/p>\n<p>OpenAI published three CVEs of its own the same day covering the identical class in Codex, credited to three unrelated research groups.<\/p>\n<p>&#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; OpenAI said in the record for <strong>CVE-2026-19592<\/strong>.<\/p>\n<p>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<p><strong>core.fsmonitor<\/strong>\u00a0is a Git performance setting whose value is a command that Git runs to identify changed files, and Git reads it from the repository&#8217;s own\u00a0.git\/config. Any operation that refreshes the index, including\u00a0git status\u00a0and\u00a0git diff, executes that command.<\/p>\n<p><!--adsense--><\/p>\n<p>The 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.<\/p>\n<p>Manifold, which\u00a0published the findings as <strong><a href=\"https:\/\/www.manifold.security\/blog\/ai-coding-agents-git-hijack\" target=\"_blank\">GitSpawn<\/a><\/strong>, wrote up five of the eight in detail and said it found the pattern in more agents than it names.<\/p>\n<p><a name=\"more\"\/><\/p>\n<p>&#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; Manifold said.<\/p>\n<p>The following agents and versions are affected &#8211;<\/p>\n<ul>\n<li><strong>goose<\/strong>\u00a0&#8211; All versions prior to 1.44.0, fixed in 1.44.0<\/li>\n<li><strong>Codex CLI<\/strong>\u00a0&#8211; 0.102.0 through 0.130.0, fixed in 0.131.0<\/li>\n<li><strong>Codex Desktop for macOS<\/strong>\u00a0&#8211;\u00a0260202.0859\u00a0through\u00a026.513.31313, fixed in\u00a026.519.22136<\/li>\n<li><strong>Codex Desktop for Windows<\/strong>\u00a0&#8211;\u00a026.304.38\u00a0through\u00a026.513.40821, fixed in\u00a026.519.21041, and Microsoft Store package\u00a026.304.38.0\u00a0through\u00a026.513.4821.0, fixed in\u00a026.519.2081.0<\/li>\n<li><strong>Claude Code<\/strong>\u00a0&#8211; Confirmed by Manifold on 2.1.193 and fixed by 2.1.196 on the\u00a0core.fsmonitor\u00a0path, with the\u00a0claude ultrareview\u00a0path confirmed live on 2.1.252<\/li>\n<li><strong>Hermes Agent<\/strong>\u00a0&#8211; 0.18.2 and 0.21.0 confirmed by Manifold, fix pending<\/li>\n<li><strong>Qwen Code<\/strong>\u00a0&#8211; 0.19.6 and 0.22.3 confirmed by Manifold, fix pending<\/li>\n<li><strong>Grok Build<\/strong>\u00a0&#8211; 0.2.93 and 1.0.13 confirmed by Manifold, fix pending<\/li>\n<\/ul>\n<p>In goose, the\u00a0goose review\u00a0command builds its Git invocations with one configuration flag,\u00a0-c core.quotePath=off, and strips nothing else.<\/p>\n<p>GitHub assigned CVE-2026-72718 a CVSS 4.0 base score of 7.0 in an\u00a0<a href=\"https:\/\/github.com\/aaif-goose\/goose\/security\/advisories\/GHSA-r5pp-p5r8-466r\" target=\"_blank\">advisory crediting Francisco Rosales<\/a>, the only score any of these findings carries.<\/p>\n<p>&#8220;So running goose review inside a malicious repo runs attacker code &#8211; 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<p>Sonar reported\u00a0<a href=\"https:\/\/www.sonarsource.com\/blog\/claude-arbitrary-code-execution\/\" target=\"_blank\">the same sink in April<\/a>, noted that Anthropic had already moved the startup sequence once to close it, and identified the same trust-dialog bypass in Visual Studio Code before 1.63.1 (<strong>CVE-2021-43891<\/strong>) and in JetBrains IDEs before 2021.3.1 (<strong>CVE-2022-24346<\/strong>).<\/p>\n<p>&#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.<\/p>\n<p>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.<\/p>\n<p>Anthropic has previously disclosed\u00a0<a href=\"https:\/\/thehackernews.com\/2026\/02\/claude-code-flaws-allow-remote-code.html\" target=\"_blank\">pre-trust execution flaws<\/a>\u00a0in Claude Code, and its June advisory for CVE-2026-55607 identifies git fsmonitor execution during worktree operations.<\/p>\n<h3>What Is Still Unpatched<\/h3>\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.<\/p>\n<p>The researchers reported the Claude Code\u00a0core.fsmonitor\u00a0finding on June 26 and says it was fixed by 2.1.196 on June 29. The report was closed as a duplicate of one filed earlier that day, Manifold said.<\/p>\n<p>Anthropic published no advisory for it, and The Hacker News confirmed on September 2 that the vendor&#8217;s published advisory record for the npm package covers neither of the Claude Code findings.<\/p>\n<p>The second Claude Code path, reached through\u00a0claude 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 2.1.252 on September 1, against the current release 2.1.258. No source states whether the subsequent releases have closed it.<\/p>\n<p>Alibaba&#8217;s security response centre accepted the Qwen Code report on July 7. The Hacker News confirmed via the npm registry on September 2 that 0.22.3, the version Manifold re-tested, is the latest published release.<\/p>\n<p>Nous Research&#8217;s Hermes Agent, which an operator\u00a0<a href=\"https:\/\/thehackernews.com\/2026\/07\/hacker-runs-hermes-ai-agent-unattended.html\" target=\"_blank\">ran unattended in an intrusion<\/a>\u00a0against a Thai government network in July, drew six contact attempts across five channels and left the private advisory untriaged, Manifold said.<\/p>\n<p>VulnCheck assigned <strong>CVE-2026-71963<\/strong>, according to Manifold. The Hacker News found no published record for that identifier in MITRE&#8217;s CVE List on September 2, where the identifiers either side of it are published VulnCheck records.<\/p>\n<p>xAI closed an earlier report of the same class as informative on July 1. It closed Manifold&#8217;s July 14 report as a duplicate of that one.<\/p>\n<p><!--linkads--><\/p>\n<p>Separate research on\u00a0<a href=\"https:\/\/thehackernews.com\/2026\/07\/grok-build-uploads-entire-git.html\" target=\"_blank\">the same 0.2.93 build<\/a>\u00a0found Grok Build uploading whole Git repositories to xAI storage, which the company addressed on X rather than through an advisory.<\/p>\n<p>Manifold documented\u00a0<a href=\"https:\/\/thehackernews.com\/2026\/08\/threatsday-ghostjacking-ai-attacks.html\" target=\"_blank\">the same class in Cursor<\/a>\u00a0CLI three weeks earlier, where a repository-supplied setup command ran before the workspace-trust prompt and outside the sandbox.<\/p>\n<p>No source reports exploitation of any of these findings. The Hacker News checked the U.S. Cybersecurity and Infrastructure Security Agency&#8217;s\u00a0Known Exploited Vulnerabilities catalog\u00a0on September 2, version 2026.09.01, with 1,687 entries, and found none of the CVEs listed.<\/p>\n<p>&#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\u00a0<a href=\"https:\/\/www.cobalt.io\/blog\/red-team-technique-exploiting-git-fsmonitor-for-initial-access\" target=\"_blank\">a red-team writeup in December<\/a>.<\/p>\n<p>Users are advised to perform the following checks &#8211;<\/p>\n<ul>\n<li>Inspect\u00a0.git\/config\u00a0before opening a received directory with an agent, looking for\u00a0core.fsmonitor,\u00a0core.hooksPath, and\u00a0attr.tree\u00a0alongside a clean or process filter<\/li>\n<li>Run\u00a0git config &#8211;get core.fsmonitor\u00a0inside any repository that arrived as files<\/li>\n<li>Run\u00a0git config &#8211;global &#8211;list | grep fsmonitor\u00a0to audit the global configuration<\/li>\n<li>Set\u00a0git config &#8211;global core.fsmonitor false\u00a0to disable the setting by default<\/li>\n<li>Vendors shipping agents strip the configuration on background calls, for example\u00a0git -c core.fsmonitor=false status<\/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.<\/p>\n<\/div>\n<p><a href=\"https:\/\/thehackernews.com\/2026\/09\/malicious-git-configs-can-make-claude.html?utm_source=tldrinfosec\">Source link <\/a><\/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":16,"featured_media":23744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[143],"tags":[],"class_list":["post-23743","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts\/23743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/comments?post=23743"}],"version-history":[{"count":0,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts\/23743\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/media\/23744"}],"wp:attachment":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/media?parent=23743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/categories?post=23743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/tags?post=23743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}