A flaw in four widely used AI coding agents lets someone who controls a plugin's code repository swap the plugin an agent installs for a malicious one, even when the agent locked that plugin to a specific reviewed version, security firm Air Security said on Thursday. The firm said Anthropic has patched the flaw in Claude Code 2.1.179 and OpenAI in Codex 0.146.0, that GitHub Copilot has no fix, and that Google will not patch the Gemini CLI, which it is retiring. The agents install add-ons called plugins from online marketplaces. To stay safe, a marketplace locks each plugin to a single reviewed version by its commit hash, a long string that identifies an exact snapshot of the code. Air found that the agents fetch that snapshot but never check that the code they end up with actually matches it. A branch is a named line of code in a repository. On a code host that lets someone create a branch whose name is made to look like the commit hash, the owner of a plugin's repository can point that name at different code. The agent then installs the different code while still reporting that it is on the locked version. Because a plugin runs with the same access as the person using the agent, the swapped code can access that person's files, saved credentials, and the systems they can log in to, Air said. The trick does not work everywhere. GitHub does not allow branch or tag names that look like commit hashes, according to GitHub's documentation, so a plugin installed from a GitHub reposi...
Plugin4Shell Lets Repository Owners Swap Pinned Plugin Code Across Four AI Coding Agents
The Hacker News
·Published Sep 18, 2026
·Updated
Affected Software
4 affected components
Anthropic Claude Code
OpenAI Codex
GitHub Copilot
Google Gemini CLI