Claude Code checked out a plugin's pinned 40-character SHA but never compared HEAD to it, so a branch named like the SHA won Anthropic patched a high-severity flaw (CVE-2026-86063, CVSS 7.7) in Claude Code and Claude Desktop, fixed in version 2.1.179, where the plugin install flow ran git checkout on a marketplace's pinned 40-character commit SHA without verifying that HEAD matched it. An attacker controlling a plugin's upstream repository could create a branch named identically to the pinned SHA, causing the checkout to silently resolve to the attacker's branch tip and install attacker-controlled code. The fix adds a comparison of the resulting HEAD against the pinned SHA, a check the advisory's reporter, Or Nevo Michrowski of Air Security, says any script that pins and checks out commits should adopt. Pinning a dependency to a full commit SHA is supposed to mean this exact code, as reviewed. An October advisory for Claude Code CVE-2026-86063, fixed in 2.1.179 showed a plugin install that ran git checkout on the pinned SHA and never checked where HEAD ended up, so a branch whose name was that same 40-character string could take its place. The fix is one comparison, and any script of yours that pins and checks out commits needs the same one. The advisory is GHSA-pq7j-f95f-qfcv, Plugin Commit SHA Pin Bypass Allows Installation of Attacker-Controlled Code https://github.com/anthropics/claude-code/security/advisories/GHSA-pq7j-f95f-qfcv , rated High CVSS 7.7 . Affected versions are Claude Code before 2.1.179, and 2.1.179 is the patched version. The description is two sentences long and worth reading in full. "The plugin install flow in Claude Code and Claude Desktop checked out a marketplace's pinned commit SHA using git checkout without verifying that the resulting HEAD matched the pinned SHA. An attacker controlling a plugin's upstream repository could create a branch named identically to the pinned 40-character SHA, causing the checkout to silently resolve to the attacker's branch tip instead of the reviewed commit, resulting in attacker-controlled code being installed bypassing the pinned hash." The conditions are narrow, and the advisory lists all three: "Exploitation required a user to install a malicious plugin, pin to a safe hash, and for the plugin source to be hosted on a git host that permitted SHA-shaped branch names." It also says "Users on standard Claude Code auto-update have received this fix already." The reporter was Or Nevo Michrowski of Air Security. The pin is written by whoever publishes a plugin marketplace, not by the person installing. Claude Code's marketplace reference https://code.claude.com/docs/en/plugins/marketplace-reference describes plugin sources of type github , url and git-subdir , which share two fields: ref and sha . The sha field is "a full 40-character lowercase commit SHA", and when you set both ref and sha , the reference says Claude Code checks out the sha . The reason to set sha is review. A marketplace maintainer reads a plugin at one commit and pins that commit, so that what users install is what was read, even if the plugin's author later pushes something else. The advisory's precondition, "pin to a safe hash", is exactly that workflow, and the attack is aimed at the moment the pin is supposed to pay off: the upstream repository is controlled by someone who wants to ship different code. Git's own documentation for git checkout https://git-scm.com/docs/git-checkout explains how one string can mean two things. For the