Playbooks · Coding
A trojanized Claude Code extension stole SSH keys
Written November 9, 2026
On October 29, a tampered copy of the Claude Code extension was served for about 11 hours and reached at most 5,000 users. It planted an SSH key and a reverse tunnel. If Cursor updated the extension that day, run the one-line key check — removing the extension does not undo what it did.
What happened
Between about 2:27am and 1:35pm PT on October 29, 2026 — 09:27 to 20:35 UTC — a maliciously modified version of Anthropic's Claude Code extension, versions 2.1.312 and 2.1.313 for macOS and Windows, was available in the Cursor VS Code Extension Marketplace. Cursor's security notice says the versions were not developed by Anthropic. Reporting on the notice puts the number affected at most 5,000 users. Cursor removed the bad versions, shut the marketplace down, audited the other extensions, rotated its keys, rebuilt the marketplace, and worked with the hosting provider to take the attacker's server offline. The notice says it has no evidence that other versions of the extension, or the official distribution, are affected.
The payload ran as soon as the editor loaded the extension, with no click and no Claude prompt. It collected host and user details — hostname, username, operating system, architecture, home directory path, environment variable names, working directories, configured Git email and public IP address — and sent them to the attacker's server. It tried to add an attacker-controlled SSH key to the machine's authorized keys file, turn on the local SSH service, and open a reverse SSH tunnel to 134.209.82.225. It tried to make the tunnel survive a restart: a LaunchAgent on macOS, or a scheduled task that tried to run as SYSTEM with a Startup-script fallback on Windows. Background scripts retried the tunnel roughly every 60 seconds.
Two limits on the damage are worth knowing, and neither is a reason to skip the check. Turning on the local SSH service needs administrator rights the extension does not have on most hosts, so on those hosts the attacker could not have logged in through the tunnel — though the extension still added the key, installed the persistence files and sent host details. And the attacker's server has since been taken offline. Removing the extension does not undo any of this: the payload drops standalone scripts that keep running after the extension is gone.
Where the bad build came from — an unresolved conflict
The record disagrees on which marketplace served the tampered build, and this page does not pick a side.
- Cursor's account: the tampered builds came from Cursor's own extension marketplace. Cursor's notice names its marketplace and the two versions.
- Anthropic's account: the tampered build was never on Open VSX, the Microsoft Visual Studio Marketplace, or any Anthropic distribution channel, and its own systems were not compromised.
- The correction: the first reports named the Open VSX registry. ThreatDefence's advisory, first published October 30, corrected itself on October 31 to match Cursor's account, and notes that the corrected version reflects those corrections.
- What stays unresolved: at least one early analysis describes a trojanized sample taken from Open-VSX. How a tampered sample came to be examined from Open-VSX while Cursor and Anthropic say the marketplace copy was the only one is not settled in the published record.
What is settled is the check: it is the same whichever marketplace served the file. If you installed or updated the Claude Code extension on October 29, check the machine for the planted key, not for where the download came from.
The check
The planted key carries the comment svc-telemetry. On macOS, run:
grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"
On Windows, run in PowerShell:
$files = "$HOME\.ssh\authorized_keys", "C:\ProgramData\ssh\administrators_authorized_keys" | Where-Object { Test-Path $_ }
if ($files -and (Select-String svc-telemetry $files)) { "svc-telemetry key found" } else { "No key found; machine not impacted" }
If the key is there, the machine is impacted. Isolate it, then run Cursor's remediation script for your platform — remediate-macos.sh as the affected user on a Mac, remediate-windows.ps1 from an elevated PowerShell on Windows — both linked from Cursor's notice. The scripts remove the bad extension, the persistence mechanisms, the running tunnel processes and the attacker's SSH key, and they exit with a nonzero status if anything remains. Then rotate credentials and sessions reachable from the affected host, from a clean machine, and assess whether the host should be rebuilt. Update the extension to 2.1.314 or later: that is the fixed version.
Also check the persistence files, because a key check alone does not prove they are absent: ~/Library/LaunchAgents/com.apple.sysmond.plist on macOS, a scheduled task named SysMon on Windows, and ~/.config/.smt and ~/.config/.smtk on either. The full check, with every indicator and the cleanup order, is on the companion page Check a Cursor machine for the tampered Claude Code extension.
The lesson
Extension marketplaces are a supply-chain surface. The real 2.1.313 never existed on the official channels — the tampered build wore a version number the real release had not reached — so a version number alone was not a check. What would have caught it: the publisher and the marketplace the install came from, and a habit of checking an extension's version against the official release before installing it. The same lesson as checking a package name before installing it, one layer up: the name looked right, and the source was wrong.
Limits
- This page covers only versions 2.1.312 and 2.1.313 served on October 29, 2026. It says nothing about other extensions, other versions or other marketplaces.
- No CVE has been assigned for this incident. Do not cite one.
- The vector — which marketplace served the tampered build — is contested as described above. The Cursor-marketplace account is the one Cursor and Anthropic give; the early Open-VSX reports are part of the record and are not settled.
- The key check answers one question: whether the planted key is in the authorized keys file. A machine with no key can still carry persistence files, and a machine with persistence files still needs the full cleanup.
Related playbooks
- Check a Cursor machine for the tampered Claude Code extension
- Gemini CLI 0.68 preview: extension checks
- Gemini CLI 0.68 stable: extension checks
- Check where your coding agents store API keys on your own machine
Sources
- Security notice: malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) — Cursor
- Claude Code 2.1.313 Extension Compromise: Detect and Remove — ThreatDefence
Back to: Coding playbooks hub · Also: Check a Cursor machine for the tampered Claude Code extension · Check every package name your agent invents · Audit apps that installed agent plugins for you