Sunday, September 13, 2026

GitSpawn Flaw Enables Arbitrary Code Execution in Claude Code, Codex, Cursor and Grok

A newly disclosed vulnerability class, named GitSpawn, reveals a serious weakness in AI coding agents that automatically execute Git commands to understand a developer’s project better.

Researchers at Manifold Security discovered that several tools, including Claude Code, OpenAI Codex, Cursor, Grok Build, Goose, Hermes Agent, and Qwen Code, might inadvertently run commands controlled by an attacker during standard context collection, based on a repository’s Git configuration.

GitSpawn Flaw

This issue is particularly troubling as vulnerable agents can invoke commands such as `git status` or `git diff` immediately after a project is opened.

In some cases, this Git activity occurs before the user has a chance to enter a prompt, approve a workspace-trust dialog, or authenticate with the service.

If a malicious repository is delivered intact with its .git directory, its configuration can cause Git to execute a command on the developer’s host system with the logged-in user’s privileges.

The primary execution path identified by researchers involves Git’s `core.fsmonitor` configuration. This legitimate setting aims to enhance performance in large repositories by allowing Git to call an external helper to determine which files have changed.

However, Git reads the `core.fsmonitor` value from the local repository configuration. When an AI agent runs commands to refresh Git’s index, such as `git status` and `git diff`, Git may inadvertently execute the configured helper command.

If the agent does not neutralize repository-controlled configurations beforehand, the repository can effectively dictate which command Git executes.

Unlike a traditional malicious Git clone, the GitSpawn attack necessitates that the victim receives a project directory containing the .git folder. Researchers noted that simply cloning, fetching, or pulling a malicious repository does not transfer the harmful configuration to the victim’s environment.

Claude Code – core.fsmonitor

Instead, likely delivery methods include ZIP archives, shared drives, synchronization folders, removable media, and project directories that are exchanged among consultants, developers, or organizations. The research team used ZIP-based delivery in their proof-of-concept demonstrations.

The potential impact is severe because the spawned process operates outside the AI agent’s usual sandbox and approval workflow. An attacker could gain access to SSH keys, cloud credentials, API tokens, shell configuration files, source code, and other repositories connected to the affected developer account.

Claude Code – ultrareview

Because the command runs through the agent’s background Git subprocess, there may be no visible warning, approval request, or interaction indicating that code has been executed.

Manifold Security documented eight findings across seven coding agents. Claude Code’s `core.fsmonitor` issue was confirmed in version 2.1.193 and reportedly fixed in version 2.1.196.

OpenAI Codex and Cursor were also affected, but researchers stated that both products have since been patched following reports from other researchers. Goose resolved its GitSpawn vulnerability in version 1.44.0, following CVE-2026-72718, which was rated 7.0 in severity.

However, as of September 1, several products remain exposed. Hermes Agent, tracked as CVE-2026-71963, was confirmed vulnerable in version 0.21.0.

Qwen Code continued to be affected in version 0.22.3, and Grok Build remained vulnerable in version 1.0.13. Researchers also reported a separate, unpatched issue in Claude Code’s ultrareview path, which utilizes a different Git configuration execution sink rather than `core.fsmonitor`.

These findings underscore a broader security concern for automated developer tools: the processing of automated context gathering can lead to the execution of untrusted code.

Vendors should invoke Git with repository configurations disabled or explicitly sanitized, particularly before establishing trust prompts or sandbox boundaries.

Developers should consider archived repositories containing .git directories as potentially unsafe and should update affected coding agents as patches become available. The comprehensive technical research is available from Manifold Security.

Keep your SOC up to date on active malware & phishing within 24h of their emergence. Try ANYRUN to prevent incidents with early detection

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

Threat Actors Use Claude AI Agents to Automate Cyberattacks and Steal Sensitive Data

Threat actors are increasingly using Claude-based AI workflows to...

China-Linked Hackers Chain Chrome Zero-Day With Windows Kernel Flaw in Attacks

China-linked threat actors UTA0560 and JungleBamboo chained a Google...

New Phishing Campaign Abuses Windows Mshta.exe to Steal Credentials and Secrets

A newly identified phishing campaign is abusing the legitimate...

CISA Warns of Critical GitLab Vulnerability Exploited in Attacks

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has...

Researchers Uncover 10,000+ Malware Loaders Behind YouTube and SEO Poisoning Campaign

A long-running pay-per-install (PPI) operation that used YouTube gaming...

VLC Media Player Flaws Let Attackers Corrupt Memory and Leak Sensitive Data

Two security vulnerabilities in VLC media player versions 3.0.0...

CISA Adds Exploited MikroTik RouterOS Flaws to Security Alert

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has...

Related Articles

Recent News