If your developers use an AI coding agent with plugins, there is a good chance one of those plugins was “pinned” to a reviewed version and everyone felt safe about it. In September 2026, researchers showed that the pin could be quietly sidestepped in four of the biggest agents. The flaw is called Plugin4Shell, and it matters even if you have never installed a plugin yourself, because it shows where the next wave of software supply chain attacks is heading.
Plugin4Shell is a zero-click remote code execution flaw, disclosed by the AIR Security research lab in September 2026, that breaks the SHA-pinning check AI coding agents use to lock a plugin to one reviewed commit. It affected Anthropic’s Claude Code, OpenAI’s Codex, GitHub Copilot and Google’s Gemini CLI. Claude Code 2.1.179 and Codex 0.146.0 fix it; at disclosure, Copilot had no patch and Google reportedly did not plan to patch Gemini CLI.
In one sentence: An attacker who controls a plugin’s repository could make an AI coding agent install different code than the commit it was pinned to, and with auto-update on, that code could run without anyone clicking anything.
Key takeaways
- SHA pinning is meant to lock a plugin to one exact, reviewed commit. Plugin4Shell showed the agents checked out the pin but never verified the code on disk matched it.
- The trick for Claude Code, Codex and Copilot: a Git branch named exactly like the 40-character commit hash. Gemini CLI had a different variant involving a branch named FETCH_HEAD.
- Because Claude Code and Codex auto-update plugins by default, the swapped code could run with zero user interaction.
- The malicious code runs with the agent’s permissions, which often include source code, credentials and cloud tools.
- Fix: update Claude Code to 2.1.179 or later and Codex to 0.146.0 or later. No CVE had been assigned at disclosure, and no attacks in the wild were reported.
What is Plugin4Shell?
AI coding agents such as Claude Code and Codex can be extended with plugins that add skills, commands and tools. Plugins are shared through marketplaces, which are catalogs that point to Git repositories. To stop a plugin author from changing code after it has been reviewed, marketplaces pin each plugin to a specific commit SHA, the long hexadecimal ID Git gives every commit. In theory, once the SHA is pinned, the agent always installs exactly that reviewed code.
AIR Security researchers Or Nevo, Dor Granat and Niv Hoffman found that this guarantee did not hold. They built working exploits against all four agents in May 2026, reported them to the vendors in June, and published the research in mid September. AIR describes it as the first true supply chain vulnerability of the AI agent ecosystem, because earlier agent research mostly attacked the model or its reasoning rather than the way agents install code.
How does the SHA-pinning bypass work?
For Claude Code, Codex and Copilot, the install process came down to two Git commands: clone the plugin repository, then check out the pinned SHA. The problem is that Git accepts a branch name in the same place it accepts a commit ID. If the repository contains a branch whose name is the same 40 characters as the pinned commit, Git can check out the branch instead of the commit.
- A marketplace reviews a plugin and pins it to commit
aaaa.... - Whoever controls the plugin repository creates a new branch literally named
aaaa...that points to different, malicious code. - The agent runs its checkout of the pinned value and lands on the branch.
- Nothing checks that the files on disk actually belong to the pinned commit, so the install reports success and the expected SHA.
- With background auto-update on, the agent pulls the swapped code on its own, and it runs with the agent’s access.
The Cloud Security Alliance summarized it as a failure of artifact identity verification: the marketplace pinned correctly, but the client never confirmed it received what was pinned. Codex’s fix adds a check after checkout that the resulting commit matches the pin, which is the missing step.
Which AI coding agents are affected, and are they fixed?
| Agent | Variant | Status (as reported at disclosure) |
|---|---|---|
| Claude Code (Anthropic) | Branch named like the SHA | Fixed in 2.1.179 |
| Codex (OpenAI) | Branch named like the SHA | Fixed in 0.146.0 |
| GitHub Copilot (Microsoft) | Branch named like the SHA | No patch at disclosure |
| Gemini CLI (Google) | Branch named FETCH_HEAD | Google reportedly did not plan to patch |
Researchers also noted there is no configuration setting that restores the pinning guarantee for Copilot or Gemini CLI, so for those tools the protection has to come from how you choose and review plugins. Check each vendor’s own release notes for later changes, since patch status can move after a disclosure.
Why does this matter for companies?
An AI coding agent is not a chat window. It reads and writes your repositories, runs commands in a terminal and often holds tokens for GitHub, cloud consoles and package registries. Code that runs inside the agent inherits that reach. In practice, a single swapped plugin could reach source repositories, credentials, cloud tooling and internal systems on a developer laptop or in a CI runner.
It also breaks a common assumption in security reviews. Many teams approve an AI tool and then approve a list of plugins at specific versions, believing the version pin is the control. Plugin4Shell shows the pin is only as good as the client that enforces it. This is the same lesson the wider software world learned from package registry attacks, now arriving in the AI tooling layer. If you already follow software supply chain practices, they apply here too.
It connects to other agent risks we have covered. MCP tool poisoning hides instructions in tool descriptions to steer an agent. Plugin4Shell is different: it swaps the code itself. Both point to the same conclusion, which is that whatever you connect to an agent becomes part of your attack surface.
What should you do now?
- Inventory your agents. List every AI coding agent on developer machines and in CI pipelines, including versions.
- Update. Claude Code to 2.1.179 or later and Codex to 0.146.0 or later. Make updating part of your normal patch cycle.
- Limit plugins. Allow only plugins from marketplaces you trust and that your team has reviewed. Remove plugins nobody uses.
- Review auto-update. For high-risk environments, decide whether background plugin updates should be on, and who approves new versions.
- Shrink the blast radius. Give agents short-lived, least-privilege tokens. Do not run them with production cloud credentials on a laptop.
- Watch for drift. Where possible, verify that installed plugin files match the expected commit, and alert on unexpected changes in agent plugin folders.
- Treat CI runners carefully. An agent in a build pipeline sits next to signing keys and deploy credentials, so isolate it.
Frequently asked questions
Is Plugin4Shell being exploited in the wild?
At disclosure, no attacks in the wild were reported and no CVE had been assigned. AIR demonstrated the issue with proof of concept exploits and reported it to the vendors before publishing.
Am I affected if I never installed a plugin?
The attack needs an installed plugin from a marketplace whose repository the attacker controls or has compromised. If you use no plugins, this specific path does not apply, but you should still keep your agent updated.
How do I fix Plugin4Shell in Claude Code?
Update Claude Code to version 2.1.179 or later, which AIR and the Cloud Security Alliance report as fixed. For Codex, update to 0.146.0 or later. Copilot and Gemini CLI had no fix at disclosure, so limit plugins there.
The bottom line
Plugin4Shell is a small bug with a big message: an AI coding agent is privileged software, and its plugins are part of your supply chain. Update the agents that have fixes, keep plugins to a short reviewed list, and give agents only the access they need. If you are new to these tools, our guide to AI security skills is a good next read.
Sources: Cloud Security Alliance research note; The Register; InfoWorld; CSO Online; SecurityOnline.


