Cybersecurity

Plugin4Shell: The AI Coding Agent Supply Chain Attack Explained

A flaw called Plugin4Shell shows how AI coding agent plugins can be swapped for malicious code even when they look safely locked to a reviewed commit.

Editorial Team / /10 min read
Clawd in a yellow hard hat holds a plugin card beside a red-glowing impostor chip, with OpenAI and GitHub logos

If you install plugins for an AI coding agent, you’ve probably seen the little reassurance that the plugin is pinned to a specific commit, identified by a long string of letters and numbers called a SHA (a cryptographic fingerprint of exactly that version of the code). The idea is that nobody can quietly swap the code under your feet. A security firm called Air has shown that, on four major AI coding agents, this reassurance can be an illusion. They named the underlying flaw Plugin4Shell, a vulnerability class rather than a single bug with a tracking number, and it changes who you’re actually trusting when you add a plugin to your coding agent.

What Plugin4Shell actually is, and what it is not

Plugin4Shell is not a product, a company, or a single patchable bug with a CVE number (the public catalog identifier used to track individual security flaws). It’s a name Air gave to a pattern: a way that pinning a plugin to a commit hash can be defeated so the agent ends up running different code than the one that was reviewed and approved. That distinction matters for anyone trying to track whether “their” software is affected, because there is no single advisory number to check against a scanner. The flaw lives in how the pinning check works, not in one shippable piece of code.

It’s also worth being precise about what Plugin4Shell is not. It is unrelated to other, previously disclosed security issues in AI coding agents, including separate token-exfiltration flaws reported in the past by other researchers. Those were different mechanisms, found and fixed independently. Treating them as the same story would be inaccurate, and this article keeps them apart deliberately.

Air published its findings in a detailed report on Plugin4Shell, following what the security industry calls coordinated disclosure: tell the affected vendors privately first, give them time to fix it, then publish. Air says it found the issue in May 2026, notified the four vendors in June, and went public in September, a roughly 90-day window that is standard practice for this kind of research.

Air's Plugin4Shell report page describing the commit-pinning bypass Air — the security firm that discovered and named Plugin4Shell, publishing its coordinated-disclosure report.

The gap: a hash check that never asks where the hash came from

Here is the mechanism, in plain terms. When a plugin marketplace pins a plugin to a commit, it’s really just storing that SHA, the long fingerprint that uniquely identifies one exact snapshot of the code. When your agent installs the plugin, it checks out that commit and verifies the hash matches. If it matches, the agent trusts it.

The problem Air found is that this check verifies the hash is correct, but never verifies the hash actually came from the repository the marketplace says it did. If an attacker can make a different piece of code answer to that same fingerprint, inside a repository they control, the check still passes. The lock is real. It’s just checking the wrong door.

Air documented two distinct ways to pull this off, and they rely on a quirk of how version control software resolves names.

The first vector, which Air found works against Claude Code, Codex, and GitHub Copilot, abuses a conflict between two kinds of references inside a code repository: a commit hash and a branch name. An attacker creates a branch literally named after the 40-character SHA that the plugin is pinned to, and sets it as the repository’s default branch. When the agent checks out “that SHA,” the tool resolves the branch reference instead of the actual commit, because branch references take priority. The attacker’s branch, not the original reviewed commit, is what gets pulled down and run.

A keyring with two nearly identical tags sharing the same stamped serial, a laptop terminal glowing out of focus behind them

This vector has a platform-specific wrinkle that most summaries of the story miss. GitHub itself blocks you from naming a branch with a string that looks exactly like a 40-character hexadecimal SHA, which closes off part of the attack there. Air notes that Bitbucket and self-hosted Git servers allow this branch-naming configuration, which makes the technique more directly usable on those platforms than on GitHub’s own hosting.

The second vector is specific to Google’s Gemini CLI and works differently: the agent does fetch the correct pinned commit, but never re-verifies it after the checkout step. If the repository’s default branch happens to be named FETCH_HEAD, a reference Git itself uses internally to track what was just downloaded, the checkout silently resolves to that branch instead of the commit that was actually verified.

In both cases, the visible proof, the hash in the plugin’s listing, stays identical to what a careful reviewer approved. Nothing about the hash itself changes. What changes is which code actually lands on the machine.

Before going further, it’s worth putting this in context: supply chain attacks that exploit trust in a dependency, rather than a flaw in the dependency’s own code, are not new. We’ve covered how self-propagating worms spread through compromised package registries, and Plugin4Shell fits the same family: the weak point isn’t the plugin’s logic, it’s the verification step that is supposed to stand between you and whatever that logic turns out to be.

What’s actually at stake if it’s exploited

Air’s own description of the impact, quoted directly from its report, is that successful exploitation produces “full compromise of the agent and the host it runs on,” reachable through a zero-click remote code execution. AI coding agents typically run with broad permissions on a developer’s machine: they can read source code, execute commands, and often hold credentials for other systems the developer uses. A plugin that silently swaps in attacker-controlled code at install time inherits all of that access.

Air didn’t have to build a fresh demonstration to show how exposed that access really is: in an earlier, separate piece of research called The Story of Skills, Air built a malicious “skill” (a different kind of reusable agent capability, not a Plugin4Shell-style pinned plugin) and watched it go viral, reaching more than 26,000 agents before it was pulled. That number demonstrates how easily a trusted marketplace can be abused in general, not the SHA-pinning bypass specifically. Air also published a separate, related piece of research it calls SkillJacking, finding 925 hijacked “skills” (reusable plugin capabilities) affecting around 134,000 agents. None of these numbers are a measured, real-world count of how many systems were actually compromised through Plugin4Shell itself. It’s an important distinction: the numbers show how large the attack surface around agent marketplaces is in general, not that an attack at that scale actually happened through this specific flaw.

Where the four major agents stand

Three months after coordinated disclosure, the four vendors Air contacted are in four different places, and the differences say as much about incentives as about engineering.

Claude Code, Anthropic’s coding agent, shipped a fix in version 2.1.179, released 16 June 2026, according to Air. Anthropic’s public release notes for that version don’t mention Plugin4Shell, but Air reports that Anthropic confirmed the fix on 17 June 2026, and The Register likewise reports that Claude Code was patched in 2.1.179.

Claude Code's official GitHub release notes for version 2.1.179 Claude Code v2.1.179 — Anthropic’s own release notes for the version that contains the fix, though the release notes don’t name Plugin4Shell explicitly.

Codex, OpenAI’s coding agent, is reported by Air to have patched the issue in version 0.146.0. Air verified the fix on 12 August 2026, and The Register also reports that OpenAI patched the flaw; OpenAI has not published a statement of its own.

Gemini CLI, Google’s agent, will not be patched, and Air reports that this is a deliberate choice rather than an oversight: Google has deprecated the product and is directing users to migrate to a successor called Antigravity CLI instead. A fix to an end-of-life tool simply wasn’t on the roadmap.

GitHub Copilot, Microsoft’s agent, has not been patched according to Air’s report, and the situation is disputed. A GitHub spokesperson told The Register that “GitHub does not allow users to create branch or tag names that resemble commit SHAs” and that the reported vulnerability cannot be exploited on GitHub. Air disagrees, noting that marketplaces can also be hosted on platforms such as Bitbucket, and that Claude Code’s own documentation lists Bitbucket and self-hosted Git as valid marketplace backends. Microsoft did not respond to The Register’s request for comment and, according to Air, did not answer its June report. The disagreement is presented here as open rather than decided.

The pattern across all four is not a simple pass/fail. It’s patched, patched (per Air and The Register), deprecated-so-moot, and disputed. Three different reasons for three different kinds of “not fixed,” none of them negligence in the simple sense.

Why the fix isn’t really about these four vendors

The durable part of this story isn’t the scoreboard above, because that scoreboard will be out of date the next time any of these four agents ships a release. The durable part is the design assumption that made the flaw possible in the first place: that checking a hash is the same as checking provenance (where something actually comes from).

It isn’t. A hash tells you that two pieces of code are byte-for-byte identical. It tells you nothing about which repository produced them, or whether the thing you’re comparing against was ever genuinely reviewed. Plugin4Shell exploits exactly that gap, by making an attacker-controlled branch answer to the same fingerprint a reviewer approved somewhere else. Any system that pins to a hash without also independently confirming where that hash was fetched from carries the same structural weakness, regardless of which vendor built it or which agent is involved. That’s the kind of framework-level thinking we’ve also covered when comparing how different AI security frameworks like OWASP, MITRE ATLAS, and NIST approach this class of risk.

For a developer using any of these tools today, the practical takeaway isn’t to panic about a specific plugin. It’s to understand that “pinned to a commit” is a weaker guarantee than it sounds, and that plugin marketplaces built on top of general-purpose version control systems inherit whatever ambiguity those systems allow between names and references.

FAQ

Is Plugin4Shell a CVE I should be tracking?

Plugin4Shell is not a CVE (the standard numbered identifier for individual security flaws). It’s a vulnerability class that security firm Air named to describe a pattern, a way that commit-pinning checks in AI coding agent plugin systems can be bypassed, rather than one specific bug with a single tracking number.

Does this mean my AI coding agent plugins are actively compromised?

Not necessarily. Plugin4Shell describes a technique that could be used to swap plugin code undetected. Air has shown how exposed agent marketplaces can be in general through earlier research (a viral malicious skill and a separate SkillJacking study), but those numbers measure Air’s broader research reach, not a confirmed count of real-world compromises through this specific technique.

Which AI coding agents have actually fixed this?

Claude Code shipped the fix in version 2.1.179 in June 2026, which Air reports Anthropic confirmed. Codex is reported fixed in 0.146.0, verified by Air and also reported patched by The Register. Gemini CLI will not be fixed because Google has deprecated it. GitHub Copilot remains unpatched, and GitHub says the attack cannot be exploited on GitHub, which Air disputes.

Why does pinning to a commit hash not fully protect against this?

Commit-hash pinning in AI coding agent plugins verifies that a hash matches, but Air’s research found it doesn’t verify the hash genuinely came from the expected repository. An attacker who controls a repository can make a branch answer to the same hash a reviewer approved elsewhere, so the check still passes while different code gets installed.

What should a developer do while vendors sort this out?

Treat “SHA-pinned” plugin listings as a weaker guarantee than they sound, especially on Bitbucket or self-hosted Git servers where Air found the branch-naming trick is more directly usable. Favor plugins from marketplaces or publishers you can verify independently, and keep your coding agent updated to whichever version addresses this class of issue.

#ai-coding-agent#supply-chain#plugin4shell#cybersecurity#ai-security