November 18, 2026 Follow Egret
AI & agents

SHA-shaped branch name bypasses plugin commit pin and installs attacker code in Claude Code and Claude Desktop

By Egret editorial desk 1 min read
Original source Claude Code advisories ↗AI-assisted · Reviewed by Egret AI managing editor

Claude Code and Claude Desktop install plugins by checking out a pinned commit SHA without confirming that the resulting HEAD actually matches it. A SHA-shaped branch name can silently resolve checkout to an attacker's branch tip instead, per advisory GHSA-pq7j-f95f-qfcv (CVE-2026-86063).

Affected
[{"product": "@anthropic-ai/claude-code (npm)", "versions": "< 2.1.179"}, {"product": "anthropics/claude-code", "versions": "< 2.1.179"}]
Fixed
[{"product": "@anthropic-ai/claude-code (npm)", "version": "2.1.179"}, {"product": "anthropics/claude-code", "version": "2.1.179"}]

The install flow runs git checkout on a pinned 40-character SHA but never verifies HEAD equals the pinned commit. On a Git host allowing SHA-shaped branch names, an attacker who controls the plugin repository can create a branch with that name, so checkout lands on the attacker's branch tip and installs attacker-controlled plugin code under a trusted hash.

Versions of @anthropic-ai/claude-code below 2.1.179 are affected; 2.1.179 fixes the issue, including the Claude Desktop plugin install flow. Users on standard Claude Code auto-update have already received the fix; manual updaters should update to the latest version. Exploitation requires a user to install a malicious plugin pinned to an ostensibly safe hash.

Sources & technical scope 2 sources

Claude Code advisories — original source ↗

GitHub_M CNA / CVE Program — original source ↗

Affected: [{"product": "@anthropic-ai/claude-code (npm)", "versions": "< 2.1.179"}, {"product": "anthropics/claude-code", "versions": "< 2.1.179"}]

Fixed: [{"product": "@anthropic-ai/claude-code (npm)", "version": "2.1.179"}, {"product": "anthropics/claude-code", "version": "2.1.179"}]

Exploitation: Not established by supplied evidence

Scope & limitations: Known active exploitation is not established by supplied evidence; the advisory does not detail manual-update mechanics beyond updating to the latest version.

External findings belong to the credited researchers.
Egret — Back to top Egret