Versions 2.1.312 and 2.1.313 of the Claude Code for VS Code extension (Anthropic.claude-code)
for macOS and Windows were distributed through the Cursor extension marketplace with a malicious
loader prepended to the bundled extension.js. The loader runs as soon as a VS Code-based editor
loads the extension, before the extension activates and without any user interaction, and
installs a persistent SSH backdoor. The loader also contains Linux code paths, but Cursor
identified modified packages only for macOS and Windows.
Cursor confirmed that the malicious versions were available in its marketplace between about
2:27am and 1:35pm PT on October 29, 2026, and that at most 5,000 users were affected. According
to Cursor, these versions were not developed by Anthropic. Cursor first named only 2.1.313 and
updated its indicators on October 30, 2026 to add 2.1.312. Cursor removed both versions, rebuilt
its marketplace, found no other tampered extensions, and had the attacker server taken offline.
Open VSX and the npm package @anthropic-ai/claude-code are not affected. Version 2.1.314 replaces both.
Version 2.1.312 is also an official release. The 2.1.312 published by Anthropic on the
Visual Studio Marketplace is not malicious; only the copy Cursor served was modified. Because
this advisory matches on version, an official 2.1.312 install (for example in Visual Studio Code
installed from Microsoft's marketplace) is reported as well. Check which editor the extension
belongs to and compare the VSIX or extension.js hash below: an install in Cursor, or a file
that matches a listed hash, is affected.
Uninstalling or updating the extension does not remove the backdoor. On every machine that had version 2.1.312 or 2.1.313 installed from the Cursor marketplace:
remediate-macos.sh as the affected
user (not as root) on macOS, or...2.1.3122.1.313Exploitability
AV:NAC:LPR:NUI:NScope
S:CImpact
C:HI:HA:H10.0/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H