Skip to content
Plugin4Shell: Is Your AI Coding Agent Still Vulnerable?
NewsSeptember 21, 20269 min read

Plugin4Shell: Is Your AI Coding Agent Still Vulnerable?

Plugin4Shell hit four major AI coding agents with zero-click RCE. Claude Code and Codex are patched. Here is what Copilot and Gemini CLI users need to do now.

Plugin4Shell is a zero-click remote code execution flaw that broke SHA pinning across Claude Code, OpenAI Codex, GitHub Copilot, and Gemini CLI. Claude Code (fixed in v2.1.179, current v2.1.278 is safe) and Codex are patched. GitHub Copilot and Gemini CLI have no complete patch as of September 20, 2026.

I spend most of my day inside Claude Code. When AIR Security dropped the Plugin4Shell disclosure on September 17, the first thing I did was check my version. Then I spent a few hours reading every technical writeup I could find. Here is the actual situation -- what the flaw does, which tools are exposed, and what you need to check.

What is Plugin4Shell and how does it work?

Plugin4Shell exploits a shared assumption baked into four major AI coding agents: that naming a commit SHA and verifying that the checked-out code matches it are the same operation. They are not -- and that gap is the entire attack surface. The vulnerability was found by AIR Security in May 2026 and disclosed to all four vendors in June, giving each more than three months to respond before public release on September 17, 2026.

The mechanic: when you install a coding agent plugin pinned to a specific commit hash, the agent performs a git checkout using that hash as a reference -- but does not verify that the code at the retrieved location actually matches the expected content. Attackers exploit this by creating a branch whose name looks like a commit SHA on platforms that allow it (Bitbucket being the documented example). The agent checks out the attacker's branch, runs whatever code is there, and reports the correct locked version because the name matched.

No click required. No install prompt. No visible change in the interface. The malicious code runs at plugin load time -- which on a typical dev workflow means it runs before you have typed a single command. The only precondition is that the plugin source repository lives on a platform that allows SHA-format branch names. (AIR Security disclosure)

AIR had working proof-of-concept exploits against all four affected agents by May 2026. The shared root cause: the agents all made the same architectural assumption that a name is a verification. It was not a copy-paste bug or a shared library -- each tool independently arrived at the same flawed checkout logic. (Help Net Security)

Free Newsletter

Get the daily AI agent signal in your inbox.

One email, every morning. The builds, tools, and frontier research that matter — no fluff, no AI hype cycle noise.

Subscribe free

Which tools are patched -- and which ones are not?

Two of the four affected tools have shipped fixes. Claude Code (patched in v2.1.179) and OpenAI Codex (patched in v0.146.0) are safe on current versions. GitHub Copilot and Gemini CLI have no complete patch as of September 20, 2026 -- one by vendor inaction, one by planned deprecation.

Claude Code -- Patched in v2.1.179, shipped August 14, 2026. The fix validates the retrieved tree object against the expected hash before execution; if there is a mismatch, the checkout is refused. Current version is v2.1.278. Anthropic did not name the security fix in the v2.1.179 release notes -- it shipped as a silent patch. (CyberSecurityNews, FourWeekMBA)

OpenAI Codex -- Patched in v0.146.0 before the September 17 public disclosure. If you are on a current Codex install, you are protected.

GitHub Copilot (Microsoft) -- No complete patch as of September 20. GitHub's stated mitigation is that they block branches named like commit SHAs on GitHub-hosted repositories, which prevents the attack on their platform specifically. Researchers contest the scope: Copilot supports external marketplace plugins hosted on Bitbucket and other platforms that do not restrict SHA-format branch names. The underlying client-side checkout logic is unpatched. (Help Net Security)

Gemini CLI (Google) -- No fix. Google deprecated Gemini CLI and directed users to Antigravity. Existing installs will not receive a Plugin4Shell patch. If you are still running Gemini CLI in any active workflow, that is an unpatched RCE surface with no vendor remediation path. (Help Net Security)

Get the AI Agent Briefing

One email per week. The best AI agent news, tutorials, and tools -- written by someone who actually builds with them.

Subscribe Free

What can an attacker actually do with Plugin4Shell?

A successful exploit runs attacker-controlled code at plugin load time, inheriting every permission the developer account carries. That means local source code, cloud credentials, SSH keys, environment variables, CI/CD tokens, and any secret the coding agent can reach -- which is typically everything in the developer environment.

The reason this is worse than a typical RCE is that coding agents are specifically designed to have broad access. They read your entire project, write to your filesystem, execute shell commands, call APIs, and interface with cloud providers. That is the value proposition. Plugin4Shell turns that privilege against you: an attacker who compromises a plugin gets the same reach as the developer running it.

The documented blast radius: read access to the full local repository, write access to the filesystem, credentials stored in environment variables, cloud provider tokens (AWS, GCP, Azure), SSH keys, internal repository access, and any CI/CD integrations the agent touches. An attacker with this access on a developer machine has everything needed to move laterally into production systems. (Remio.ai, Aviatrix Threat Research)

As of the September 17 disclosure, AIR Security has not reported exploitation in the wild. No breach, incident, or data loss has been attributed to Plugin4Shell. That said, the gap between vendor notification (June 2026) and public disclosure (September 17) was over three months -- three months during which two of four vendors had not shipped a fix and the vulnerability was described in technical detail to multiple engineering organizations.

Does GitHub's mitigation actually fix the problem?

GitHub's position is that they block branch names resembling commit SHAs on GitHub-hosted repositories, making the name-confusion attack impossible on their platform specifically. Researchers agree this is a real platform-level guard -- but disagree that it constitutes a complete client-side fix for Copilot users.

The problem: GitHub Copilot supports plugin marketplaces beyond GitHub. Bitbucket, GitLab self-hosted, and other Git platforms do not impose the same naming restrictions. If any Copilot plugin in your install pulls from those sources, the platform-level mitigation does not apply. The underlying checkout logic in the Copilot client remains unpatched, which means the vulnerability surface shifts rather than closes as external marketplace support evolves. (Windows Forum, The Hacker News)

Whether this is acceptable depends entirely on your plugin sources. GitHub-only plugins carry lower practical risk while you wait for a proper patch. Any plugin from Bitbucket or an external Git host means the underlying vulnerability is fully present.

What do you need to check right now?

For Claude Code and Codex users, the fix is a version update. For Copilot users, the immediate action is a plugin source audit. For Gemini CLI users, the only path is migration to a tool that is actively maintained and patched.

Check your Claude Code version. Run claude --version in your terminal. If you are below v2.1.179, update immediately with npm update -g @anthropic-ai/claude-code. The current safe release is v2.1.278.

Check your Codex version. Run codex --version. If you are below v0.146.0, update via npm. Current installs are covered.

Audit your Copilot plugin sources. Open your Copilot plugin list and check which marketplace each plugin comes from. GitHub-hosted plugins have lower risk given GitHub's SHA-naming restriction. Plugins from Bitbucket or external Git hosts are the active exposure. There is no committed patch timeline from Microsoft as of September 20 -- watch the release notes.

Migrate off Gemini CLI. There is no patch coming and no vendor support path. If Gemini CLI is in any active workflow, move to Claude Code or Codex. Both are patched, both are actively maintained, and the migration cost is low compared to running on an unpatched RCE surface indefinitely.

FAQ

Does Plugin4Shell affect Claude Code users today?

Claude Code versions below v2.1.179 are vulnerable to Plugin4Shell. If you are running v2.1.179 or higher -- including the current v2.1.278 -- you are protected. Anthropic patched the checkout logic so the agent validates the retrieved tree against the expected hash before execution, refusing to run if there is a mismatch. Update with npm update -g @anthropic-ai/claude-code if you are behind.

What is SHA pinning and why did it fail across these agents?

SHA pinning locks a plugin to a specific commit hash to prevent silent code updates between installs. It failed in these four agents because each one performed git checkout by referencing the hash as a name, without verifying that the retrieved code actually matched that hash content. An attacker can create a branch named like a SHA on a permissive platform, redirecting the checkout to attacker-controlled code while the pin appears valid to the agent.

Was Plugin4Shell exploited in the wild before the September 17 disclosure?

AIR Security has not reported observed exploitation. No breach, incident, or data loss has been attributed to Plugin4Shell as of the September 17 disclosure date. The flaw was reported to vendors in June 2026, opening a three-month window between private notification and public disclosure. Whether it was quietly exploited during that window is not publicly known.

What should Gemini CLI users do?

Migrate now. Google deprecated Gemini CLI and directed users to Antigravity. No Plugin4Shell patch is planned for existing installs. If Gemini CLI is still in any active workflow, it represents an unpatched remote code execution surface with no vendor remediation path. Claude Code v2.1.278 and Codex are both patched and actively maintained alternatives.

Get the AI Agent Briefing

One email per week. The best AI agent news, tutorials, and tools -- written by someone who actually builds with them.

Subscribe Free

Published September 21, 2026

All articles
AI Agents First

The daily signal from the frontier of AI agents.

Join builders, founders, and researchers getting the sharpest one-email read on what's actually shipping in AI — every morning.

No spam — unsubscribe anytime