GitSpawn is a class of eight flaws across seven command-line AI coding agents, disclosed by Manifold Security on September 1–2, 2026. A repository can carry an attacker command inside its own .git/config. When an agent quietly runs git status or git diff to gather project context, git executes that command as the logged-in user — outside the agent's sandbox and before any trust or approval prompt appears.
Three of the findings carry NVD-confirmed CVEs: CVE-2026-19592 (OpenAI Codex, CVSS 7.3), CVE-2026-72718 (goose, CVSS 7.0), and CVE-2026-55607 (Claude Code worktree confusion, CVSS 8.8). No in-the-wild exploitation has been reported, and CISA's KEV catalog held zero matching entries as of September 2. The technique is trivially weaponizable, so treat this as an urgent hunt-and-harden item, not a wait-and-see one.
◈ Table of Contents
01 · What GitSpawn Is
PHASE 01Modern AI coding agents are given a folder and told to "understand this project." To do that, they run ordinary git plumbing in the background — git status, git diff, index refreshes — before you have typed a single instruction. GitSpawn turns that convenience into a remote-code-execution primitive: the repository itself dictates a command that git faithfully runs on the agent's behalf. The attacker never needs the model to cooperate. They only need you to open the folder.
Manifold Security documented the class under the name GitSpawn, covering eight distinct flaws across seven agents. The severity is not in the payload — an attacker can run anything the user can — but in the absence of friction: the code fires with no prompt, no approval, no model call, and in several agents before the workspace-trust dialog is even shown. Sonar flagged the same sink class in April 2026, and a Cobalt red-team writeup in December 2025 framed it plainly: the abuse rides a legitimate git feature, not a memory-safety bug.
| Attribute | Detail |
|---|---|
| Class name | GitSpawn (Manifold Security) |
| Nature | Command-execution via repository-local git config sinks |
| Scope | 8 flaws across 7 CLI AI coding agents |
| Confirmed CVEs | CVE-2026-19592, CVE-2026-72718, CVE-2026-55607 |
| Privilege gained | Arbitrary command execution as the logged-in user |
| User interaction | Open a repo folder with an agent (no prompt / approval) |
| In-the-wild use | None reported as of Sep 2, 2026 (0 matches in CISA KEV) |
| Primary source | Manifold Security — "GitSpawn" |
GitSpawn does not require a supply-chain compromise of any real project. An attacker crafts an ordinary-looking repo, plants the config, and ships it. The "code review this for me" or "help me build this take-home test" pretext is enough.
02 · Disclosure Timeline
PHASE 02- 1Dec 2025 — A Cobalt red-team writeup documents
core.fsmonitorabuse against tooling, characterising it as exploitation of a legitimate git feature rather than a defect. - 2Apr 2026 — Sonar reports the same sink class against AI coding agents; Anthropic had already moved Claude Code's startup sequence once to close it.
- 3Jun 25, 2026 — Claude Code 2.1.193 ships; the
core.fsmonitorexposure persists on this build per later analysis. - 4Jun 26 – Jul 20, 2026 — Manifold Security's GitSpawn findings are reported to the affected vendors across a coordinated window.
- 5Aug 10, 2026 — CVE-2026-72718 (goose) is published in NVD; fix lands in goose 1.44.0.
- 6Sep 1, 2026 — OpenAI publishes three independent CVEs for Codex covering the identical class, including CVE-2026-19592.
- 7Sep 2, 2026 — Public GitSpawn writeup lands; CISA's KEV catalogue (1,687 entries) contains none of the GitSpawn CVEs.
The Sonar and Cobalt precedents matter for your risk narrative: this is not a novel zero-day surprise but a recurring, well-telegraphed sink that vendors kept re-introducing. Treat "we patched it once" as insufficient evidence that an agent is safe.
03 · The Git Config Attack Surface
PHASE 03Git has several configuration keys whose value is a command git will run. They exist for legitimate performance and workflow reasons, but any of them, if read from a repository-local .git/config that an attacker controls, becomes a code-execution sink. GitSpawn abuses three primitives:
| Git config key | Legitimate purpose | Why it executes code |
|---|---|---|
| core.fsmonitor | Speeds up status/diff by asking a helper program what changed | Its value is a command git runs on every index refresh |
| core.hooksPath | Relocates the hooks directory (pre-commit, post-checkout, etc.) | Points git at attacker-supplied hook scripts that run on routine ops |
| attr.tree + clean/process filters | Applies content filters (e.g. LFS smudge/clean) per gitattributes | Filter definitions invoke external commands during checkout/diff |
A benign core.fsmonitor looks like this — it names a fast file-system-monitor daemon:
Git makes no distinction between a trusted daemon name and an arbitrary shell command in that field. The moment the index is refreshed, whatever string sits there is handed to the shell. GitSpawn's insight is simply that AI agents refresh the index constantly and automatically, long before a human decides whether to trust the folder.
A normal git clone does NOT copy the source repo's local config into your new clone — so cloning from GitHub is not the risk here. The danger is receiving a repository as raw files with its .git/ directory intact.
04 · Technical Deep Dive — How the Agent Fires the Payload
PHASE 04The execution chain has nothing to do with the language model. It lives entirely in the git plumbing the agent wraps. Walk it step by step:
git status, git diff, or an explicit index refresh. This happens autonomously so the model has file context to reason over..git/config — the file the attacker controls — and executes it to ask "what changed since last time?" Git does not sandbox, sign, or allow-list this value.Manifold deliberately withheld weaponized payloads for the still-unpatched agents. The point is structural: the field is executed verbatim, so any command an operator could type, git will run for them.
This is why "I always click 'don't trust' on unknown repos" is not a mitigation for GitSpawn. The trust decision arrives after the payload, not before it.
Related but distinct is CVE-2026-55607 in Claude Code (CVSS 8.8): its worktree handling allowed creating a worktree named .git and navigating to worktrees outside the sandbox, producing git-directory confusion (CWE-22/59/78). Different mechanic, same theme — the boundary between "the repo's git metadata" and "the agent's trusted execution context" is thinner than anyone assumed.
05 · Per-Agent Trigger Matrix
PHASE 05The sink is the same; the trigger point differs per agent. What follows is drawn from Manifold's published matrix. The alarming column is "when" — several agents fire before any user consent gate.
| Agent | Trigger event | Executes when | Status at disclosure |
|---|---|---|---|
| goose | goose review | During diff gathering — no prompt, model call or approval | Patched (1.44.0) |
| Claude Code (fsmonitor) | Open project folder | Before workspace-trust prompt | Patched (2.1.196) |
| Claude Code (review path) | Review command | Before trust prompt | Reported unpatched |
| Codex CLI / Desktop | Repo metadata collection | On context gather | Patched (0.131.0 / desktop builds) |
| Cursor | Documented separately by Manifold | On context gather | Patched |
| Hermes Agent | First message sent | Before workspace-trust prompt | Reported unpatched |
| Qwen Code | Open folder | Before user authentication | Reported unpatched |
| Grok Build | First keystroke | Before message is even sent | Reported unpatched |
A CVE was assigned to the Hermes Agent finding, but it was not yet published in NVD at the time of writing — so it is not enumerated here. Track the vendor advisory for Hermes, Qwen Code and Grok Build; those paths were still executing repo-supplied commands at publication.
06 · Affected Versions & Patches
PHASE 06| Product | CVE | Affected | Fixed | CVSS |
|---|---|---|---|---|
| OpenAI Codex CLI | CVE-2026-19592 | 0.102.0 – 0.130.0 | 0.131.0 | 7.3 High |
| Codex Desktop (macOS) | CVE-2026-19592 | 260202.0859 – 26.513.31313 | 26.519.22136 | 7.3 High |
| Codex Desktop (Windows) | CVE-2026-19592 | 26.304.38 – 26.513.40821 | 26.519.21041 | 7.3 High |
| goose | CVE-2026-72718 | < 1.44.0 | 1.44.0 | 7.0 High |
| Claude Code (worktree) | CVE-2026-55607 | 2.1.38 – 2.1.162 | > 2.1.162 | 8.8 High |
| Claude Code (fsmonitor) | — | 2.1.193 | 2.1.196 | See advisory |
| Hermes / Qwen Code / Grok Build | pending / unpublished | see vendor advisories | pending | Unpatched |
CVE-2026-19592 is classified CWE-15 (Improper Initialization) and CVE-2026-72718 is CWE-94 (Code Injection). The root cause is identical in spirit: the agent shelled out to git without first neutralising the repo-local config.
Pin your agent versions in a managed allow-list. Auto-updating CLIs mean "we're patched" can silently regress if a developer pulls an older pinned build or an unpatched sibling tool (Qwen, Grok Build) into the same workflow.
07 · The Distribution Vector — Why Clone Is Safe, Files Are Not
PHASE 07The exploit's one requirement is that the repository arrives with its .git/ directory — and therefore the malicious local config — intact. A fresh git clone builds a new .git/ and does not import the source's local config, so cloning from a forge is not the delivery path. Everything that copies raw files preserves the trap:
ZIP / TAR ARCHIVE
"Here's the codebase as a .zip" — extraction preserves .git/config verbatim. A classic for take-home coding assessments and consultancy handoffs.
SHARED DRIVE / NAS
A repo dropped on a team file share or SMB mount. Any developer who opens it with an agent inherits the payload.
SYNC FOLDER
Dropbox, OneDrive, Google Drive sync the whole tree including .git/. One poisoned upload propagates to every synced endpoint.
USB / REMOVABLE MEDIA
Physical handoff of a repo folder. No network artefacts, no clone log — the config is just there on mount.
FAKE RECRUITER TEST
The "complete this take-home in our starter repo" lure — already a live tradecraft for other actors targeting developers.
VENDOR / CONTRACTOR DROP
Third-party code delivered as an archive rather than a repo URL. Trust in the counterparty substitutes for provenance.
Hunt heuristic: any repository that entered the estate as an archive, share-copy or USB import — rather than via a git clone against a known remote — is a higher-risk candidate for a .git/config inspection sweep.
08 · Artifact & Configuration Indicators
PHASE 08Because no in-the-wild campaign has been reported, there are no attacker hashes, IPs or domains to publish — inventing them would be malpractice. The durable indicators for GitSpawn are configuration artefacts and process behaviour. These are what your hunt should key on:
| Indicator | Where | Why it matters |
|---|---|---|
| core.fsmonitor set to a shell command | Repo-local .git/config | Legit fsmonitor names a daemon; a full command or shell metacharacters are suspect |
| core.hooksPath pointing inside the repo tree | Repo-local .git/config | Redirects hooks to attacker-supplied scripts that run on routine ops |
| attr.tree + clean/process filter defs | .git/config / .gitattributes | Filter commands invoked during checkout/diff |
| git.exe spawning a shell child | EDR process telemetry | git launching cmd/powershell/sh during status/diff is the execution signature |
| Agent binary → git → shell lineage | EDR process tree | node/claude/codex/goose/qwen as the grandparent of a shell spawn |
| Repos arriving as raw files | Download / archive extraction logs | The only delivery path that preserves the malicious local config |
09 · Detection & Hunt Queries
PHASE 09Hunt 1 — git spawning a shell during index operations. This is the highest-fidelity behavioural signal: git itself launching a command interpreter while running status/diff/index work.
Hunt 2 — AI agent as the ancestor of a shell. Catches the fuller lineage where the coding agent invoked git which invoked a shell, even when git wrappers rename the process.
Hunt 3 — filesystem sweep for poisoned configs. Run across dev endpoints and file shares. Flags any repo whose local config carries an execution sink.
Sigma rule for portability across SIEMs:
Tune Hunt 1 against your baseline: some legitimate hook-heavy workflows (Husky, pre-commit, Git LFS) also make git spawn shells. Pivot on repo provenance (file-delivered vs cloned) and on shells that fire at agent-startup time to separate signal from routine dev noise.
10 · MITRE ATT&CK Mapping
PHASE 10| Tactic | Technique | ID | GitSpawn relevance |
|---|---|---|---|
| Initial Access | Supply Chain Compromise | T1195 | Poisoned repository delivered as raw files |
| Execution | User Execution: Malicious File | T1204.002 | Victim opens the repo folder in an AI agent |
| Execution | Command and Scripting Interpreter | T1059 | fsmonitor/hooks value run via the shell |
| Persistence / Priv. Trigger | Event Triggered Execution | T1546 | Git index-refresh / hook events trigger the payload |
| Defense Evasion | Abuse Elevation / Trusted Feature | T1548 / T1059 | Runs before the trust prompt, outside the agent sandbox |
11 · Mitigation & Hardening
PHASE 11.git/config before pointing an agent at it. Wrap the Hunt-2 filesystem sweep into onboarding for archives, contractor drops and take-home tests.Open genuinely untrusted repositories inside a disposable VM or a throwaway container with no credentials, no SSH agent and no cloud tokens mounted. If GitSpawn fires there, it fires into an empty room.
Do not rely on the workspace-trust prompt as your control. For several GitSpawn paths the code runs before that prompt is answered, so it protects nothing here.
- All in-use agents on fixed builds; unpatched siblings removed or air-gapped
- core.fsmonitor disabled globally on developer endpoints
- .git/config inspection is mandatory for any file-delivered repo
- Hunt 1 / Hunt 3 queries deployed and baselined in the SIEM
- Untrusted repos only opened in disposable, credential-free sandboxes
12 · Sources & References
PHASE 12Run the GitSpawn hunt now. Sweep your developer fleet and file shares for poisoned .git/config sinks, paste any suspect config or repo URL into the CyberHawk IOC Scanner, and pin your AI coding agents to the fixed builds. For live detections and threat-hunting content, follow the CyberHawk Threat Intel feed.
◈ Stay Connected
Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.
"They can't exploit you if you are the Exploit."