All articles
IT & Cybersecurity· 3 min read

Plugin4Shell: AI agent plugin auto-updates can silently deliver malicious code

Air Security has shown that plugin updates in Claude Code, Codex, GitHub Copilot and Gemini CLI could swap trusted plugins for malware without any user action. Two agents are fixed, Copilot had no fix as of early October and Gemini CLI will not get one.

Key points

  • Plugin4Shell lets an attacker swap a pinned agent plugin for malware through a branch named like the commit hash.
  • Affected tools: Claude Code (fixed in 2.1.179), Codex (fixed in 0.146.0), GitHub Copilot (no fix as of early October 2026) and Gemini CLI (will not be patched).
  • Marketplaces cannot fix the flaw themselves, because the checkout runs inside the agent.
  • Turn off plugin auto-update where no fix exists, and treat plugin updates like dependency updates.
  • The findings come from a secondary summary whose author did not reproduce the exploit.

Air Security has published research on a flaw it calls Plugin4Shell, which affects the plugin systems of several AI coding agents. The researchers say a plugin that a team has already reviewed and trusts can be replaced with malicious code during a normal background update, and nobody has to click anything [1]. The affected agents are Claude Code, OpenAI Codex, GitHub Copilot and Gemini CLI [1]. Anthropic and OpenAI have released fixes. GitHub has not released one for Copilot, and Gemini CLI will not be patched because the product has been discontinued [1].

We base this article on a summary that the blog thevibelog.dev published on 4 October 2026. Its author read the primary disclosure but did not reproduce the exploit [1]. Beyond that summary we have no information, for example on whether GitHub has a release date for a fix.

How the attack works

Agent plugin marketplaces pin each plugin to a specific commit hash (SHA). The pin is meant to guarantee that every installation receives the exact code that was reviewed. According to Air Security, the agents fetched whatever the pinned reference resolved to, but never checked that the result was actually that commit [1].

The way Git resolves names makes this exploitable. Anyone who controls the plugin repository can add a branch named exactly like the pinned hash and set it as the default branch. The checkout then ends up on that branch, not on the intended commit [1]. Air Security says many Git hosts accept branch names that look like hashes, Bitbucket and self-hosted servers among them [1].

The researchers describe two scenarios [1]:

  • An attacker publishes a harmless plugin, gets it through the marketplace review and swaps the content later.
  • An attacker takes over the repository of an established plugin, and the next update delivers malware to every installation.

Air Security argues that marketplaces cannot enforce a fix on their side, because the checkout runs inside the agent [1]. Each installation is therefore only as safe as the checkout logic of the agent it runs on.

Patch status

  • Claude Code: fixed in version 2.1.179, confirmed on 17 June 2026 [1]
  • OpenAI Codex: fixed in version 0.146.0, verified on 12 August 2026 [1]
  • GitHub Copilot: no fix released [1]
  • Gemini CLI: no patch planned, the product is deprecated [1]

This status dates from early October 2026. The source does not say whether GitHub has shipped a fix since then, so teams should check with GitHub directly.

Part of a broader pattern

Plugin4Shell came out during the same few weeks as other agent vulnerabilities. One of them is GitSpawn, where a manipulated git configuration runs a program as soon as an agent checks the repository status [1]. The author of the summary sees a common thread. None of these attacks targets the language model. They all go through the tooling that vendors built around it, such as git calls, updaters and configuration files [1]. The author also argues that unmaintained agent tools such as Gemini CLI are now a security risk, not just a source of missing features [1].

What to do now

The source suggests these steps:

  • Take an inventory. Record which agents run in which versions, with which plugins, on developer machines and in CI images [1].
  • Update. Claude Code needs at least 2.1.179 and Codex at least 0.146.0 for Plugin4Shell. Because of other flaws, the source recommends Claude Code 2.1.196 or later and Codex CLI 0.149.0 or later [1].
  • Stop automatic plugin updates on any agent without a Plugin4Shell fix, which currently means GitHub Copilot [1].
  • Run untrusted code in isolation, in disposable VMs or cloud containers [1].

Two further steps are our own recommendations. The source does not make them:

  • Replace Gemini CLI, because it will not be patched.
  • Set up an approval process for plugins. Review plugin updates the way you would review dependency updates, before they reach every installation.

Sources

  1. [1]AI Coding Agent Security 2026: GitSpawn and Plugin4Shell · thevibelog.dev · 4 October 2026

Written with AI from the sources above and checked by our team.

Available experts in this field

See available experts →

Open searches in this field

See skills wanted →

Your skills are not listed?

Upload your CV once. We match you with every new project in your field and tell you why it fits.

Upload your CV