FR
live
Security High CVSS 8.8

A poisoned .git/config runs code when Claude Code, Codex or Cursor opens a repository

Manifold Security disclosed on 2 September 2026 eight flaws across seven CLI coding agents: a repository delivered as an archive can trigger a local command on open, outside the sandbox and without approval, via Git’s core.fsmonitor setting. Disable core.fsmonitor by default and inspect .git/config before opening a received folder with an agent.

A row of dark keyholes on a metal plate, one amber key inserted and turned.

2 September 2026. Manifold Security publishes GitSpawn, eight vulnerabilities spread across seven command-line coding agents. The mechanism fits in one line: a repository’s own .git/config names a command that the agent runs on the developer’s machine. Why it matters: that command fires outside the sandbox, without an approval prompt, and merely opening a repository received as files is enough to trigger it.

A Git performance setting turned into code execution

The flaw is not in the model, nor in any exotic protocol. It abuses core.fsmonitor, a Git performance setting whose value is a command that Git runs to identify changed files. Git reads that value from the repository’s own .git/config. Any operation that refreshes the index — a git status, a git diff — executes it.

Coding agents run exactly those operations in the background, at session startup, to work out which branch they are on and which files have changed. They do so without touching the repository’s configuration — so they never neutralize the hostile command. Manifold’s phrasing is blunt: “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.”

The trigger point varies by agent, which makes the scenario harder to reason about. On Claude Code and Hermes Agent, the payload fires before the workspace-trust prompt is accepted; on Qwen Code, before the user has authenticated; on Grok Build, on the first keystroke.

One condition narrows the blast radius — and it is precisely what defines the realistic attack. Exploitation requires the repository to arrive as files with its .git directory intact. A normal git clone does not preserve it. A shared archive, a shared drive, a sync folder or a USB stick does. The realistic vector, then, is not cloning a public repo; it is the repository received from a third party — a recruiter’s ZIP, a colleague’s share, a vendor’s deliverable.

What is patched, and what is not

The ledger is mixed. goose (fixed in 1.44.0), Claude Code on the core.fsmonitor path (fixed in 2.1.196) and Cursor have shipped fixes. OpenAI published three CVEs the same day covering the identical class in Codex, credited to three unrelated research groups — including CVE-2026-19592, which describes a helper running “outside Codex’s command sandbox and without a user-approval prompt, allowing attacker-controlled code to run with the user’s privileges.”

Still unpatched at Manifold’s 1 September retest: Hermes Agent (confirmed on 0.18.2 and 0.21.0), Qwen Code (0.19.6 and 0.22.3), Grok Build (0.2.93 and 1.0.13), plus a second Claude Code path reached through claude ultrareview, confirmed live on version 2.1.252.

The identifiers tell part of the story. GitHub assigned CVE-2026-72718 (a CVSS 4.0 score of 7.0) to goose — the only score published across the set. VulnCheck assigned CVE-2026-71963 for Hermes Agent, but the identifier was not yet in the MITRE list as of 2 September. Most reports were closed as duplicates of other independent findings.

The real attack surface: the whole local config is suspect

core.fsmonitor is only the best-documented entry into a wider problem. A repository’s .git/config controls three other levers that also trigger local command execution: core.hooksPath, which redirects hooks to an arbitrary directory; attr.tree, which loads a hijacked attribute tree; and the clean/smudge filters, run on the way in and out of files. Any tool that trusts a received repository’s configuration inherits these levers — so Manifold’s advice to inspect those three keys is not a nicety, it is the minimum checklist.

What is really at stake is the meaning of the word “trust.” The agents’ workspace-trust prompt — the “do you trust this folder?” dialog — is supposed to be the security boundary. Yet on Claude Code and Hermes Agent, the payload fires before that dialog is accepted. On vulnerable versions the boundary is decorative: it gives the user the feeling of a control they do not yet have.

The precedent is old, which makes it worse. Sonar notes that the same trust-dialog bypass existed in Visual Studio Code before version 1.63.1 (CVE-2021-43891) and in JetBrains IDEs before 2021.3.1 (CVE-2022-24346). Five years later, the bug class is replaying inside coding agents — with one extra asset: the agent runs commands on its own, without the user typing anything at all.

A known bug, fixed once, then regressed

The striking part is that this is not an isolated discovery. Sonar reported the same sink back in April, noting that Anthropic had already moved the startup sequence once to close it. Version 2.0.34 of Claude Code, shipped 5 November 2025, stopped running git status before the trust dialog was approved — then the behavior reappeared in 2.1.193, shipped 25 June 2026. Anthropic had separately published a June advisory (CVE-2026-55607) on git fsmonitor execution during worktree operations.

That is the deeper lesson: fixing once is not enough. The bug class rests on a legitimate Git feature reused by dozens of tooling layers, and every new agent that leans on background Git commands potentially reintroduces the sink.

The timing is not incidental either. The class resurfaces just as fake recruiters are already distributing poisoned coding tests — the Nimbus Manticore campaign, documented days earlier, drops cross-platform RATs through sham job interviews. A coding agent that silently runs a received repository’s configuration turns that vector into click-free code execution, where the recruiter was hoping to at least persuade the victim to open a PDF.

bash
# Before opening a received repository with an agent, three checks:
git config --get core.fsmonitor        # the poisoned command, if present
git config --get core.hooksPath        # possible hook redirection
git config --get attr.tree             # a hijacked attribute tree

# Global hardening: disable core.fsmonitor by default
git config --global core.fsmonitor false
git config --global --list | grep fsmonitor

Verdict

If you develop with a CLI coding agent, run git config --global core.fsmonitor false now and update your agent — goose ≥ 1.44.0, Codex ≥ 0.131.0, Cursor current, Claude Code past 2.1.196. Codex installations pinned below 0.131.0 remain exposed even though the current release is 0.152.1.

If you receive repositories from third parties — recruiter archives, vendor shares, client deliverables — treat them as untrusted code: inspect .git/config (looking for core.fsmonitor, core.hooksPath, attr.tree) before opening them in an agent, not after.

If you embed agents in your CI/CD, require the tool to neutralize configuration on background calls (the git -c core.fsmonitor=false status pattern) and audit the versions you ship. No exploitation is documented today and none of these CVEs is in CISA’s KEV catalog — but the window between proof of concept and campaign is exactly when you apply the fix, not when you wait for one.

References

cve

Linked vulnerabilities

CVE-2026-71963Hermes Agent 0.18.2 through 0.21.0, fixed in commit f6234d0, contains a remote code execution vulnerability that allows attackers to execute arbitrary OS commands by supplying a malicious repository with a crafted .git/config that sets core.fsmonitor to an attacker-controlled command. When a user opens the malicious repository and sends any message, the agent triggers a git status index refresh which executes the injected command in the user's process context, exposing the full environment including configured provider API keys. High CVSS 8.8 03/09 CVE-2026-19592OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS automatically collected Git repository metadata without disabling the repository-local core.fsmonitor setting. If a user opens or uses an attacker-prepared repository whose preserved .git/config sets core.fsmonitor to an attacker-controlled filesystem-monitor helper, Git can execute that helper while Codex collects repository metadata. The helper runs outside Codex's command sandbox and without a user-approval prompt, allowing attacker-controlled code to run with the user's privileges. The code can read, change, or delete the user's files and access other resources available to the user's account. An ordinary Git clone does not preserve the source repository's local .git/config; exploitation requires a repository delivered or copied with that configuration intact. High CVSS 7.3 01/09 CVE-2026-72718goose is general-purpose AI agent that runs on your machine. Prior to 1.44.0, the `goose review` command runs the system `git` executable to gather the diff for review without stripping attacker-controlled Git configuration. A malicious repository whose `.git/config` sets [`core] fsmonitor = <command>` causes Git to execute that command on the host during the index refresh performed by `git diff HEAD`. The command runs before goose contacts a model and without a submitted prompt, model call, tool approval, or trust prompt. The context-gathering Git process is not sandboxed and is outside goose's tool-permission model. Arbitrary commands run with the privileges and environment of the user running goose, allowing file access or modification and exfiltration of environment secrets and provider API keys. The vulnerable Git invocations are built by git_command() in crates/goose-cli/src/commands/review/handler.rs and are used by touched_files() and collect_diff() for `git diff --name-only HEAD` and `git diff HEAD`. This issue is fixed in version 1.44.0. High CVSS 7 10/08 CVE-2026-55607Claude Code is an agentic coding tool. From 2.1.38 until 2.1.163, Claude Code's worktree handling allowed creation of worktrees named ".git" and navigation to worktrees outside the sandbox context, enabling git directory confusion attacks. By exploiting symlink manipulation and git fsmonitor execution during worktree operations, an attacker could overwrite files in the user's home directory (such as .zshenv), leading to code execution outside of seatbelt sandbox restrictions. Reliably exploiting this required the user to clone a malicious repository containing prompt injection content and run Claude Code against it. This vulnerability is fixed in 2.1.163.Anthropic Claude Code High CVSS 8.8 29/06

The cyber brief, every Tuesday

The flaws that matter and the patches to apply, in a ten-minute read.

No spam. One-click unsubscribe.
read next

On the same topic

The Carbonato botnet turns exposed Docker daemons into Telegram-controlled AI agents

ThreatDown researchers reconstructed the Carbonato botnet, which compromises Docker daemons exposed on port 2375 and installs the open-source Hermes Agent framework with nothing but its persona file rewritten. Close port 2375, move to rootless or TLS, and revoke any AI API key sitting on a potentially affected host.

US soldier sentenced to 70 months for extorting ten telecom firms

On 28 September 2026, Cameron John Wagenius, aka kiberphant0m, was sentenced to 70 months in prison for hacking and extorting at least ten technology and telecommunications companies from his military base. The case is a reminder that insider threat and SSH brute-forcing remain an entry path as effective as any zero-day.

← Back to the feed

Type at least two characters.

↑ ↓ navigate ↵ open esc dismiss