Critical 'Plugin4Shell' Flaw Allows Zero-Click RCE in GitHub Copilot and Other AI Coding Agents
A zero-click vulnerability dubbed Plugin4Shell allows attackers to bypass cryptographic pinning in four major AI coding agents, granting them full system access. While Anthropic and OpenAI have issued patches, GitHub Copilot remains unpatched.
By Naina Verma
- Cybersecurity Analysts
- Focus on the architectural failure of unverified trust in agent checkouts and the supply chain risk.
- Industry Watchers
- Highlight the fragmented vendor response and the practical mitigations available to developers.
Perspectives this story doesn't cover
- Independent Plugin Developers
- Enterprise DevSecOps Teams
On September 17, 2026, researchers at AIR Security disclosed a zero-click remote code execution vulnerability affecting four major AI coding agents: Anthropic's Claude Code, OpenAI's Codex, GitHub Copilot, and Google's Gemini CLI. The flaw, dubbed Plugin4Shell, allows attackers to bypass the cryptographic pinning meant to secure plugin installations. "It is the first supply chain vulnerability of the AI agent ecosystem," AIR Security researchers noted in their disclosure, highlighting that the exploit grants attackers the same system access as the developer running the agent. The vulnerability exposes a critical gap between the security promises of agentic development tools and their actual implementation.[1][4][6]
The vulnerability targets the distribution layer rather than the AI models themselves. When developers install plugins from a marketplace, the agent locks the installation to a specific 40-character commit hash—a process known as SHA-pinning. This mechanism is marketed as a guarantee that the agent will run only the exact code that was reviewed, even if the repository changes later. Pinning is designed to prevent supply chain attacks by ensuring that a verified plugin cannot be silently swapped for a malicious version.[4][6]
The mechanics of the bypass rely on a quirk in how Git resolves ambiguous references. When an agent requests a checkout for a specific 40-character string, Git searches for both branches and commit hashes that match. If an attacker controls the plugin's repository, they can create a branch with a name identical to the pinned hash. Because Git prioritizes branch names over commit hashes, it silently pulls the attacker's branch instead of the reviewed commit. The agent trusts the reference it passed to Git without confirming the resulting working directory matches the intended hash.[1][4][6]
Google's Gemini CLI is exposed through a slightly different mechanism involving the FETCH_HEAD reference, though the underlying logic remains identical. The agent passes a reference to Git and trusts the result without checking. Because these agents run with the same permissions as the developer, a successful exploit provides direct access to source code, credentials, cloud infrastructure, and continuous integration pipelines. The attack effectively turns a developer's own productivity tool into a vector for network compromise.[1][6]
Google's Gemini CLI is exposed through a slightly different mechanism involving the FETCH_HEAD reference, though the underlying logic remains identical.
The threat of repository hijacking is not theoretical. In prior research, AIR Security demonstrated that attackers could take over abandoned repositories behind legitimate plugins. The firm found 925 skills already in active use that had been hijacked from their original maintainers, reaching approximately 134,000 agents. Plugin4Shell weaponizes this exact distribution layer, allowing attackers to push malicious updates to users who installed a trusted plugin months prior.[1][6]
The attack requires no user interaction to execute on systems with background auto-updates enabled, which is the default behavior for Claude Code and Codex. When a marketplace updates a pinned hash, the agent automatically pulls the new version. If the attacker has staged a malicious branch, the swap occurs silently in the background, executing the payload with the developer's full privileges. This zero-click nature makes the vulnerability particularly dangerous for enterprise environments managing large fleets of automated agents.[1][6]
The industry response has been fragmented since the initial disclosure to vendors in June 2026. Anthropic patched Claude Code in version 2.1.179, and OpenAI secured Codex in version 0.146.0. Google, meanwhile, declined to patch the consumer version of Gemini CLI, having deprecated the tool in favor of its newer Antigravity CLI, though enterprise support remains active. The uneven rollout of fixes leaves a significant portion of the developer ecosystem relying on unpatched tools.[4][6]
Microsoft has not issued a patch for GitHub Copilot. The company maintains that the attack surface is limited because GitHub's own repository hosting blocks branch names that resemble commit hashes. While accurate for plugins hosted directly on GitHub, researchers note this defense does not protect developers using third-party marketplaces or self-hosted Git servers like Bitbucket, leaving those Copilot installations exposed.[1][4][6]
The incident highlights a structural weakness in how AI coding assistants handle supply chain security. While vendors market these tools as productivity multipliers, the underlying architecture often relies on unverified trust assumptions. Until agents explicitly validate that the checked-out code matches the cryptographic pin, developers remain dependent on the security policies of the Git hosts where the plugins reside. The vulnerability serves as a reminder that adding AI to a workflow does not eliminate traditional software distribution risks.[4][6]
Key points
- AIR Security disclosed a zero-click remote code execution flaw affecting Claude Code, Codex, GitHub Copilot, and Gemini CLI.
- The vulnerability, dubbed Plugin4Shell, allows attackers to bypass SHA-pinning by creating Git branches that mimic commit hashes.
- Anthropic and OpenAI have issued patches, while GitHub Copilot remains unpatched and Gemini CLI has been deprecated.
- The exploit requires no user interaction on systems with background auto-updates enabled.
Viewpoints in depth
Security Researchers
Argue that the underlying validation flaw must be corrected by the vendor itself.
Security researchers maintain that SHA-pinning is only as strong as the verification logic that follows it. They argue that relying on Git host naming restrictions is an incomplete defense, as it leaves developers exposed when using third-party or self-hosted repositories. The burden of verifying the checkout, they assert, belongs entirely to the agent's code, which must explicitly confirm that the working directory matches the intended cryptographic hash.
Platform Vendors
Emphasize platform-level mitigations and the deprecation of vulnerable tools.
Vendors like Microsoft point to platform-level defenses as primary mitigations. GitHub highlights that its repository hosting explicitly blocks branch names that resemble commit hashes, neutralizing the attack for plugins hosted on its platform. Google, meanwhile, relies on the deprecation of the consumer Gemini CLI in favor of newer, unaffected tools like Antigravity CLI, shifting the focus away from patching legacy software.
Why this matters
The Plugin4Shell vulnerability demonstrates that the AI coding tools developers trust to accelerate their work can be silently weaponized to compromise their systems. Because the flaw bypasses the very cryptographic checks designed to secure the supply chain, developers remain exposed to remote code execution simply by having a trusted plugin installed.
Sources
[1]AIR SecurityCybersecurity AnalystsPlugin4Shell - Zero Click RCE Vulnerability found in top 4 most popular coding agents, millions of agents affected
Read on AIR Security →
[2]AI WeeklyCybersecurity AnalystsAIR Discloses Plugin4Shell Zero-Click RCE in AI Coding Agents
Read on AI Weekly →
[3]SC MediaIndustry WatchersNew 'Plugin4Shell' vulnerability affects major AI coding agents
Read on SC Media →
[4]shattered.ioCybersecurity AnalystsPlugin4Shell Bypasses SHA-Pinning in 4 AI Coding Agents
Read on shattered.io →
[5]SecurityWeekIndustry WatchersIn Other News: Ransomware Developer Sentenced, Plugin4Shell AI Attack, Critical SAP Flaw
Read on SecurityWeek →
[6]daily.devCybersecurity AnalystsZero-click RCE flaw in AI coding agents let attackers swap in malicious plugins
Read on daily.dev →
Comments
More in Technology
See all →Mobile Silicon
Qualcomm Unveils 2nm Snapdragon 8 Elite Gen 6 Chips With 5GHz CPU and Agentic AI Focus
6 sources
Process Node
TSMC Reportedly Begins Pilot Production of 1.4nm Chips Ahead of 2028 Target
6 sources
AI Infrastructure
Akamai Secures $11.6 Billion Cloud Deal to Supply Anthropic With Distributed AI Compute
7 sources
Post-Quantum Crypto
The Evidence Pack: How Cryptographers Are Defeating the Quantum Threat Before It Arrives
3 sources
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns delivered to your inbox.




