AI Security Alert: Malicious .git Configurations Hijack Claude Code, Codex, and Cursor

🛡️ Verified Threat IntelDigitalSpying Research Desk
📅 September 2, 2026⏱️ 3 min read

Executive Summary

On September 2, 2026, researchers at Manifold Security disclosed eight critical security vulnerabilities affecting seven prominent command-line AI coding agents—including Anthropic's Claude Code, OpenAI's Codex, Cursor, Hermes Agent, Qwen Code, and Grok Build (The Hacker News). The vulnerability class stems from how AI coding tools automatically invoke Git subcommands inside opened repositories without sanitizing repository-local .git/config parameters. Threat actors can distribute trojanized repositories that trick the AI assistant into running arbitrary, malicious operating system commands directly on the developer's machine outside any sandbox, with zero user confirmation prompts.

Deep-Dive Technical Analysis

The Flaw Architecture & Git Hook Exploitation

Modern developer AI assistants and agentic CLI workflows are designed to ingest full codebases to provide contextual refactoring, multi-file editing, and autonomous debugging. To perform version control tasks, these agents frequently execute Git binaries or native Git bindings.

1. Repository-Local Configuration Injection: When an AI agent executes commands such as git status, git diff, or git log, standard Git behavior respects local configurations specified inside .git/config. Adversaries can define custom hooks and binary wrappers, such as core.fsmonitor, diff..command, or core.pager.

2. Bypassing the Agentic Execution Sandbox: Unlike arbitrary bash commands generated by LLMs (which prompt the user for interactive confirmation or run in constrained containers), underlying version control invocations are treated by the AI tool as trusted internal plumbing. The local configuration names an attacker-specified binary or shell script that executes immediately as the host operating system user.

3. Delivery Vectors: Standard git clone operations over HTTPS or SSH do not copy remote .git/config files or hooks. However, developers frequently download repositories as zip/tar archives, collaborate via shared network mounts, sync repositories through cloud drives (e.g., Google Drive, Dropbox), or open cloned codebases on USB flash media where the .git directory and local configurations remain intact.

4. Active Vulnerability Surface: While initial patches have rolled out for Claude Code, Cursor, and goose, several agents—including Hermes Agent, Qwen Code, and Grok Build—remained vulnerable during September retesting. Concurrently, OpenAI published three CVE advisories addressing identical execution escape vectors within Codex.

Enterprise Blast Radius & Industry Impact

The vulnerability represents a critical supply-chain breach vector for software organizations:

* Developer Workstation Takeover: Developers frequently maintain privileged access to cloud environments, staging servers, and internal API keys. Silent remote code execution on a developer machine exposes AWS/GCP session credentials, private GitHub tokens, and SSH keys.

* Poisoned Open-Source Contributions: Malicious actors contributing seemingly harmless feature pull requests via archived repositories or secondary review bundles can trigger automatic execution when security analysts or engineers open the project with an AI coding assistant.

* Collapse of AI Trust Boundaries: As enterprises integrate agentic AI tools into daily engineering workflows, treating development tools as an implicit security boundary fails when underlying standard OS utilities honor local repository directives.

Actionable Recommendations & Mitigations

1. Sanitize Git Execution Environments: Update all AI coding agents immediately to versions that explicitly invoke Git using the -c core.fsmonitor= and --no-pager flags, or enforce Git configuration isolation using the GIT_CONFIG_NOSYSTEM=1 and --no-local operational directives.

2. Restrict Archive Ingestion: Developers and security reviewers must never open untrusted project archives or shared drives directly in AI coding assistants without first inspecting and stripping the .git/config file and .git/hooks/ directory.

3. Isolate AI Agent Execution: Enforce strict containerization (e.g., Docker development containers or isolated DevContainers) with restricted network access and non-root execution profiles for all agentic development tools.

4. Credential Rotation & Endpoint Auditing: Organizations auditing developer environments should search shell history and process logs for anomalous subprocesses spawned by AI agent parent processes (claude, cursor-server, codex).

Sources & References

The Hacker News

AUTHORIZED REVERSE ENGINEERING & WHITE-HAT SECURITY CONSULTANCYBASE PROJECT ENGAGEMENT: $10,000 USD

Enterprise Binary Reverse Engineering & White-Hat Security Consultancy

Commission our senior reverse engineers and white-hat offensive security researchers to deconstruct compiled binaries, audit proprietary firmware, uncover zero-day vulnerabilities, and harden mission-critical infrastructure under strict Mutual NDA and Authorized Rules of Engagement (RoE). Projects start at a $10,000 base retainer with deterministic forensic deliverables.

$10,000Base Project Retainer
ELF / PE / RTOSx86_64, ARM64, MIPS, RISC-V
100% White-HatMutual NDA & Authorized RoE
TIER-01 // BASE RETAINER$10,000

Binary & Firmware Reverse Engineering Sprint

ELF / PE / Mach-O / RTOS Decompilation & Protocol Reconstruction

Select $10,000 Scope →
TIER-02 // OFFENSIVE AUDIT$15,000

White-Hat Penetration Testing & Zero-Day Audit

Authorized Red-Team Intrusion, Exploit Chain PoC & Defensive Hardening

Select $15,000 Scope →
TIER-03 // FULL-SPECTRUM LAB$25,000

Hardware, IoT & Embedded Red-Team Assessment

Silicon-to-Cloud Forensics, Silicon Bus Probing & RF Telemetry Audit

Select $25,000 Scope →
Classification:Cyber Security IntelligenceZero-Day AnalysisDefensive Engineering
🛡️

About the DigitalSpying Research Desk

The DigitalSpying Threat Intelligence Desk is composed of seasoned security researchers, reverse engineers, and blue team architects. Our mission is to publish reproducible, peer-audited threat analyses, hardware security evaluations, and defensive countermeasures.