Git config in a shared folder runs code in AI coding agents

In short

8 findings across 7 agents; 4 still unpatched at publication; Over 77 million monthly npm downloads of Claude Code, per Manifold (npm API); 26 June 2026 Manifold's first report (Claude Code)

How can a Git setting run code in an AI coding agent?

A coding agent is a program that reads a project and edits or runs code on a developer's behalf, here from a terminal. To know where it is, it asks Git what branch is checked out and which files changed, using commands such as git status and git diff. Manifold's starting question was what these agents actually do when they start up.

Git keeps per-repository settings in a file, .git/config. One setting, core.fsmonitor, is meant to speed up large projects: instead of scanning every file, Git asks a helper program what changed, and it runs that program whenever it refreshes its index. Most commands that touch the working tree refresh it, so git status and git diff both do. If the repository's own config names a command there, Git runs it.

Manifold's point is that the agents ran these background calls without stripping the repository's config. The repository named a command, Git ran it, on the host, as the user. Manifold says the agent's own code starts that subprocess, so it sits outside the agent's sandbox and the permission model never sees it.

Why does "no click" matter?

Most agent attacks need the user to approve something, or need a prompt to carry hidden instructions. This one needs neither. Manifold says the command ran, depending on the agent, before the workspace-trust prompt was accepted, before the user had authenticated, or on the first keystroke of a prompt. An attacker who gets code running this way can reach, in Manifold's list, SSH keys, cloud credentials in the environment, tokens in shell config and every repository on the disk.

There is a limit. Manifold stresses that git clone, fetch and pull do not carry this: a hostile URL does nothing. The repository must arrive as files with its .git directory inside, so the route is anything that copies a folder instead of cloning it: a shared .zip, a shared drive, a sync folder, a USB stick. Manifold used a .zip for every proof of concept. It withheld a ready-made repository, and withheld the name of the setting behind one finding that is not core.fsmonitor while that finding is unpatched.

What did Manifold find in each agent?

Rows are ordered by report date by us; the Cursor and Codex rows give only what Manifold's table states. Manifold says the Codex variant works somewhat differently but is the same class, and that five of its reports came back as duplicates of findings others had already filed, one on the same day.

Case details from the post:

What should developers do?

Manifold's advice is short. If you receive a repository as files, read .git/config before opening the folder with an agent, because any setting that names a program can run it. If you build an agent, blank the setting on background Git calls, for example git -c core.fsmonitor=false status.

Since then

On 9 September 2026 the security firm grith (which sells agent-supervision software) published its own reproduction. On git 2.43.0 a folder carrying a core.fsmonitor command fired on a plain git status. It also fired with safe.bareRepository=explicit, the Git 2.38 setting from October 2022 that most commentary recommends; that setting covers bare repositories buried inside a working tree, a different delivery route. Only blanking core.fsmonitor on the call blocked it. grith also reports that Claude Code now carries both overrides in its binary, and, citing OpenAI's advisory as summarised by The Hacker News, that Codex CLI was fixed in 0.131.0 under CVE-2026-19592. We did not check those claims against the vendors.

What this does not tell us

All findings are Manifold's account, from a company that sells agent-monitoring products and ends its post with that pitch. We did not check any vendor's patch status, and the post's status column is as of 1 September 2026. The post says it found the flaw in more agents than it names, and does not give their count or names. It does not say how many users were exposed, and it reports no attack in the wild.

Terms in plain English

Sources

Sources

Related stories

More from AI and Security

All stories from AI and Security