Corrected and expanded 12 November 2026. An earlier version of this article said the malicious builds were "published to Cursor's extension marketplace" without stating clearly who was and was not affected, told readers to look for "anything you do not recognize" instead of naming the actual indicator, and attributed a 5,000-system figure to one outlet we had not verified. The scope, the exact indicators, the official check and remediation commands, and the affected/not-affected list are now below. Unverified figures have been removed.
On 29 October 2026, two builds of the Claude Code extension — versions 2.1.312 and 2.1.313 — were served from the Cursor VS Code Extension Marketplace with a backdoor added. Cursor's own security notice states these builds "were not developed by Anthropic," and that the exposure window was roughly 2:27am to 1:35pm PT.
The extension added an SSH key labelled svc-telemetry to the developer's machine, installed persistence that survives uninstalling the extension, and sent host details to attacker infrastructure. Cursor has since taken the attacker's server offline. Updating the extension does not remove what was already written to disk.
Who was affected — and who was not
This distinction matters, because plenty of developers read "Claude Code extension" and assumed their VS Code install was at risk.
| Status | |
|---|---|
| Cursor VS Code Extension Marketplace, versions 2.1.312 / 2.1.313, 29 Oct 2026 | Affected |
| Windows builds | Affected |
| macOS builds | Affected |
| Official Microsoft Visual Studio Marketplace | Not affected |
| Open VSX | Not affected |
npm package @anthropic-ai/claude-code | Not affected |
| Anthropic's own systems | Not compromised |
The Microsoft Threat Intelligence write-up published 30 October confirms the negative list directly: the malicious packages "were never published nor distributed from Microsoft Visual Studio Marketplace and from npm @anthropic-ai/claude-code," and Anthropic confirmed to Microsoft that its systems were not compromised. If you installed Claude Code from Microsoft's marketplace or via npm, you were not part of this incident.
Also relevant: this was not a lookalike extension. The malicious builds carried the official extension identity, which is exactly why it worked — developers install official extensions without a second thought, and auto-update does the rest.
What the malicious builds actually did
Per Cursor's notice, the payload:
- Collected host and user information — hostname, username, OS, architecture, home directory, working directories, configured Git email, environment variable names, and public IP.
- Attempted to add an attacker-controlled SSH key to
authorized_keys, enable the local SSH service, and open a reverse SSH tunnel. - Attempted to make the tunnel persistent via a LaunchAgent on macOS or a scheduled task on Windows, retrying roughly every 60 seconds.
Two qualifiers from the primary source that most coverage dropped:
- The SSH step usually failed. Enabling the local SSH service requires administrator rights, which the extension did not have on most macOS and Windows hosts. Cursor states the step "would fail" outside unusual circumstances where Cursor itself was started with administrator privileges.
- The attacker server no longer functions. Cursor worked with the hosting provider to take it offline, so the reverse shell and the host-detail POST are not operational.
Neither qualifier means you are safe. Cursor's own wording: the extension "added the attacker's SSH key, installed persistence, and sent host details to the attacker. Follow the remediation steps below regardless." And Microsoft notes the env-var collection recorded names matching patterns like _KEY, TOKEN, SECRET, PASS, AWS, GCP — up to forty matches. It did not demonstrate theft of the secret values, but it tells an attacker exactly what to look for next.
One point of disagreement worth stating plainly: some third-party analyses described 2.1.312 as the clean base release and 2.1.313 as the trojanized build. Cursor's notice contradicts that — it lists both 2.1.312 and 2.1.313 as malicious, each with its own modified VSIX hash for darwin-arm64 and win32-x64. Treat both as compromised.
Step 1 — Check for the key (official commands)
Cursor publishes the exact check. Run the one for your platform.
macOS:
grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"
Windows (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" }
Linux — Cursor's notice gives the macOS command; the Linux equivalent, targeting the same file and marker:
grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"
The marker is precise. You are looking for the string svc-telemetry in the key comment field. The full public key Cursor published begins ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry, and the key fingerprint is SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk. If you find it, the machine is impacted.
Microsoft adds a caveat worth repeating: a missing marker alone should not replace reviewing installation, process, network and persistence evidence. If you know you ran the extension on 29 October, check the other artefacts below too.
Step 2 — Check the persistence artefacts
The key is the door; persistence is the door that reopens. Cursor and Microsoft both publish the file paths.
macOS:
~/Library/LaunchAgents/com.apple.sysmond.plist(labelcom.apple.sysmond— note it impersonates an Apple system service)~/.config/.smtand~/.config/.smtk$TMPDIR/.stk_<10 hex characters>
Linux:
~/.config/.smtand~/.config/.smtk- A crontab entry
@reboot /bin/sh "/.config/.smt" /tmp/.stk_<10 hex characters>
Windows:
- Scheduled task named
SysMon %USERPROFILE%\.config\smt.cmdand%USERPROFILE%\.config\smtk%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd%TEMP%\.stk_<10 hex characters>
Quick checks:
# macOS / Linux
ls -la ~/Library/LaunchAgents/com.apple.sysmond.plist 2>/dev/null
ls -la ~/.config/.smt ~/.config/.smtk 2>/dev/null
crontab -l 2>/dev/null | grep -i "\.smt"
ls -la /tmp/.stk_* "$TMPDIR".stk_* 2>/dev/null
# Windows
Get-ScheduledTask -TaskName SysMon -ErrorAction SilentlyContinue
Test-Path "$env:USERPROFILE\.config\smt.cmd"
Test-Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd"
Also watch for these process patterns, which Cursor lists: ssh -N -R ':0:localhost:22', autossh -M 0, and SSH invocations carrying StrictHostKeyChecking=no, UserKnownHostsFile=/dev/null, ServerAliveInterval=30. The tunnel command translates to: connect outbound* to the attacker, and forward their traffic back to port 22 on your machine.
A running SSH process does not by itself prove the attacker got in — both ends must permit it, and Cursor reports the server is offline. It does prove the payload executed.
Step 3 — Run the official remediation script
Cursor published platform scripts that remove the extension, the persistence, the running tunnel processes and the attacker's key, and exit non-zero if anything remains.
macOS — download remediate-macos.sh, run as the affected user (not root):
bash remediate-macos.sh
Windows — download remediate-windows.ps1, run from PowerShell opened with Run as Administrator:
powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1
Both scripts are linked from Cursor's security notice. Read them before running them; they modify your SSH configuration and remove scheduled tasks.
Microsoft's manual removal steps, if you prefer to do it by hand: unload and delete the com.apple.sysmond LaunchAgent plus ~/.config/.smt and ~/.config/.smtk; on Linux remove the @reboot crontab line referencing .smt (preserving unrelated entries); on Windows remove the SysMon scheduled task, the Startup-folder sysmon.cmd, and the .config\smt.cmd / .config\smtk files. Then stop any confirmed malicious SSH processes and delete the .stk_ files.
Step 4 — Rotate everything that machine could reach
Do this from a machine you trust, not the affected one.
- SSH keys — generate new keypairs, deploy the new public keys, and remove the old ones from every server, GitHub/GitLab account, and bastion host they authorised.
- Cloud credentials — rotate access keys, invalidate sessions, and check audit logs for activity from unfamiliar addresses since 29 October.
- Git hosting tokens — revoke personal access tokens and OAuth apps, then reissue. Check the audit log for new deploy keys or webhooks.
- Package registry tokens — npm, PyPI, Docker Hub. A stolen publish token is how one compromised developer becomes a compromised ecosystem.
- Application secrets —
.envfiles, database passwords, API keys.
Rotate in that order: identity, then cloud, then code hosting, then packages, then application secrets.
Cursor's phrasing on why: "The limited env-var collection does not rule out later credential access over the backdoor." In other words, the fact that they only grabbed variable names is not evidence they did not later get further.
Step 5 — Check what the machine did while it was exposed
- Shell history in the 29 October window
last/lastlogfor logins from unfamiliar addresses- Cloud audit logs for new IAM users, new resources, or API calls you did not make
- Repository audit logs for force-pushes, new collaborators, or branch-protection changes
If you find evidence of successful attacker use rather than just the planted key, isolate the machine and treat it as a full incident rather than cleaning in place. Microsoft's guidance is explicit: preserve evidence before cleanup, and rebuild the device if trust cannot be restored.
How to reduce the exposure next time
Cursor and Microsoft both recommend controls that would have limited this:
- Restrict extensions to approved publishers — Cursor's enterprise security hardening guidance covers this.
- Set an extension installation cooldown — Microsoft notes that delaying installation of newly published versions helps limit exposure to malicious releases. In a nine-hour window, a cooldown measured in days is the difference between being affected and not.
- Do not run your editor as administrator. This incident's most damaging step — enabling SSH and opening the tunnel — failed on most hosts precisely because the editor lacked those rights.
- Treat "official publisher" as authentication, not safety. These were the official builds under the official identity. Publisher verification tells you who uploaded the code, not whether their upload path was secure.
The short version
Run the check command for your platform and look for svc-telemetry. If it is there, run Cursor's remediation script and then rotate every credential that machine could reach. If you are on Microsoft's VS Code Marketplace or npm, you were not affected.
Updating the extension closes the door. It does not undo the fact that someone already walked through it.
What we could not verify
- The number of affected installations. Cursor did not publish a figure; figures circulating in secondary coverage could not be confirmed against a primary source, so we have not repeated them.
- Whether any attacker successfully used the planted key to log in. Cursor states the server is offline and that the SSH step failed on most hosts, but neither party has published a count of confirmed intrusions.
- The Linux-specific remediation script. Cursor publishes macOS and Windows scripts only; the Linux check above uses the same marker and file path.
Sources
- Cursor, "Security notice — malicious version of Anthropic.claude-code (2.1.312 and 2.1.313)," 29 October 2026 (updated 30 October 2026) — https://cursor.com/blog/claude-code-extension-security-notice
- Microsoft Threat Intelligence, "Inside a malicious Claude Code-branded Cursor extension and its persistent SSH backdoor," 30 October 2026 — https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/
- Cursor remediation script, macOS — https://cursor.com/static/security/claude-code-extension/remediate-macos.sh
- Cursor remediation script, Windows — https://cursor.com/static/security/claude-code-extension/remediate-windows.ps1
- Cursor, enterprise security hardening guidance — https://cursor.com/docs/enterprise/security-hardening
Research and drafting for this article were assisted by AI tools. The indicators, commands and file paths above are copied from the vendors' own notices so you can verify them at the source. Last verified 12 November 2026. Spotted an error? Tell us.