Build1 publisher3 min readPublished Updated
Plugin4Shell uses default plugin auto-update to run attacker code past SHA pins in four coding agents
Plugin4Shell lets attacker code replace SHA-pinned plugins in Claude Code, Codex, Gemini CLI and Copilot through default auto-update, with no prompt. A pin only protects you if the agent checks fetched code against the hash, so agent plugins need the same review as any other dependency.
The Engineer · Build desk
What happened
- Researchers disclosed a vulnerability class called Plugin4Shell in September 2026, affecting Claude Code, Codex, Gemini CLI and Copilot.
- Because the agents' check on SHA-pinned plugin commits is broken, attackers can swap in malicious code after approval or hijack the repository the plugin points to.
- The agents auto-update plugins by default, so the swapped code lands without a click or a prompt from the user.
- The replaced plugin runs with whatever the agent can reach, including the filesystem, stored credentials, the CI pipeline and cloud accounts.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- decision Leaving auto-update at its default lets whoever controls the plugin source decide when new code runs, and that includes an attacker who compromised the source once.
- constraint Endpoint tools see an authorized agent doing authorized work, so a hijacked plugin can only be caught at the fetch step or in its tool-call traffic.
- precedent Agent plugins now need the inventory and per-fetch verification that teams already apply to npm and PyPI packages, because the root cause is the same.
A pinned commit SHA is meant to settle which code runs. The post describing Plugin4Shell puts the premise plainly: a commit hash's content does not change [6]. That guarantee depends on one check. The agent has to fetch the plugin, confirm that what arrived matches the pinned hash, and refuse to run it if it does not [7].
The post gives two ways that check can fail [7]. In the first, the checkout never strictly enforces the match. In the second, the agent silently falls back to fetching "latest" under some auto-update condition. Fetching latest means following whatever the plugin's repository points to that day, so the pin stops mattering. Both failure modes are written as conditionals. The post does not say which one applied in each of the four agents, and it does not name the researchers, link an advisory or report a vendor fix.
Auto-update delivers the payload. According to the post, an attacker has to compromise or spoof the plugin source once and then wait [14]. The agents auto-update plugins by default, so the new code arrives with no prompt [4]. The original report called the outcome "keys to the kingdom" [13].
Detection is hard at the endpoint. To the operating system, this is an authorized agent doing authorized file and network work, and there is no malware signature to match [9]. The post puts the visible anomaly in two places. One is a checkout that does not match its pinned commit. The other is a plugin that starts making tool calls it never made before: reading credential files, hitting new network endpoints, writing outside its usual paths [10].
The post is also an advertisement for Sentinel, a proxy that inspects agent tool-call traffic, and it says so [11]. It is candid about the limits. Sentinel does not verify git commit hashes and is not a replacement for an upstream fix [11]. That fix, the post says, is one the agent vendors need to ship [12].
In my view, turning plugin auto-update off is the right default for any team whose agent can reach credentials or a CI pipeline, because that is the access a swapped plugin inherits [5]. Turning it off moves the fetch to a moment someone chose. It does not repair verification. If the checkout does not enforce the hash, a manual update pulls the same swapped code. So each plugin goes into the dependency inventory with its recorded SHA, and each update gets the review a new npm or PyPI release would get. The post puts Plugin4Shell in that category, with the same root cause: trust in a dependency source that is not re-verified on every fetch [8].
What to watch
- An advisory or CVE from any of the four vendors stating which verification failure applied and which version fixes it.
- Whether the vendors switch plugin auto-update off by default or make the agent refuse any checkout whose content does not match the pinned SHA.
- Per-agent technical details from the original researchers, who are not named in the account published so far.