Playbooks · Coding
Check a Cursor machine for the tampered Claude Code extension
Written October 31, 2026
For anyone who uses Cursor with the Claude Code extension. Two versions offered through the Cursor marketplace on 29 October 2026 carried code that tried to install a persistent SSH backdoor. If you picked up either version in that window, the check below takes a minute, and the cleanup takes longer — do the check first, on every machine that runs Cursor.
Who needs to do this
Cursor's security notice names Anthropic.claude-code versions 2.1.312 and 2.1.313 for macOS and Windows, installed or updated from the Cursor VS Code Extension Marketplace between about 2:27am PT and 1:35pm PT on October 29, 2026. Those versions were not developed by Anthropic. If you use Cursor on macOS or Windows and the extension updated during that window, treat the machine as possibly affected until the key check below says otherwise. If you did not install or update the extension in that window, the notice gives no reason to act on this page.
Cursor says it 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 also says it has no evidence that other versions of the extension, or the official distribution, are affected.
What the bad extension did
The extension ran its added code as soon as the editor loaded it, before the extension's normal startup. The Phorion advisory describes the same sequence in detail. On an affected machine it:
- Collected host and user information — hostname, username, operating system, architecture, home directory path, environment variable names, working directories, configured Git email, and public IP address — and sent it to the attacker's server.
- 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 back to the attacker's server.
- 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.
Cursor says the step that turns on the local SSH service would fail on most hosts, because it needs administrator rights the extension does not have, and errors in the added code made failure more likely. That is not a reason to skip the check. The notice is explicit: the extension still added the attacker's key, installed the persistence files, and sent host details. Follow the cleanup steps regardless of whether remote login was ever turned on.
Removing the extension does not undo any of this. The payload drops standalone scripts that keep running after the extension is gone. Installing a newer version afterwards does not remove the key or the persistence files either. The cleanup below is separate work from updating the extension.
First: check for the planted key
The planted key carries the comment svc-telemetry. Cursor's notice gives the check for each platform. Run it on the affected machine, as the user who runs Cursor.
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 check prints that the key was found, the machine is impacted. Go to the cleanup section below. If it prints that no key was found, the machine is not impacted by this key — but still read the persistence section before deciding the machine is clean, because the key check alone does not prove the persistence files are absent.
Do not rely on the label alone when you look at the file yourself. Compare the whole key line against the key Cursor publishes in its notice:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry
The key's fingerprint is SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk. Phorion warns that the added code only checked whether the comment string was already present, so a search for the comment can miss a key whose label was changed. Match the key itself, or its fingerprint, not just the label.
If the key is there: clean up in order
Cursor's notice lists the response steps. In plain order:
- Run the vendor's check and search your endpoint, network, and extension-installation records for the indicators listed in the notice.
- Isolate any host showing evidence that the payload ran or that the backdoor was installed. Take it off the network before you start removing files, so the tunnel cannot be used while you work.
- Remove the unauthorized SSH key, the persistence mechanisms, and the running tunnel processes, and assess whether the host should be rebuilt. The notice says to assess a rebuild, not to assume cleanup is enough.
- Rotate credentials and sessions that were accessible from the affected host, from a trusted system — a different, clean machine, not the affected one. The notice says the limited collection of environment variable names does not rule out later credential access over the backdoor.
For the removal step, Cursor publishes a remediation script for each of the two affected platforms. Download the script for your platform from the security 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 non-zero status if anything remains. Run the script again after fixing whatever it reports, until it exits cleanly.
On macOS, run the script as the affected user, not as root, from the folder you saved it to:
bash remediate-macos.sh
On Windows, run it from PowerShell opened with Run as Administrator, in the folder you saved it to:
powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1
The Phorion advisory gives the same cleanup in the same order: kill the active tunnel processes first, then remove persistence, then clean up the SSH keys and state, then rotate credentials. The tunnel processes to look for are ssh or autossh processes connecting to 134.209.82.225 and the retry loop that restarts them. The beacon address in the advisory is the same server on port 8099.
Persistence files to look for, by platform
Use this list when you search a machine by hand, or when you read the remediation script's report. File names and paths come from the indicator lists in Cursor's notice and the Phorion advisory.
- macOS: a LaunchAgent file at
~/Library/LaunchAgents/com.apple.sysmond.plistwith the labelcom.apple.sysmondand with the files~/.config/.smtand~/.config/.smtkand a tunnel key file under the temporary directory named.stk_followed by ten characters. - Windows: a scheduled task with the name
SysMonand the files%USERPROFILE%\.config\smt.cmdand%USERPROFILE%\.config\smtkand a tunnel key file under%TEMP%named.stk_followed by ten characters and the fallback script at%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd. - Linux: the files
~/.config/.smtand~/.config/.smtkand a tunnel key file under/tmpnamed.stk_followed by ten characters and a cron entry that runs/bin/shon~/.config/.smtat reboot. Cursor's notice names macOS and Windows as the affected platforms and publishes no Linux remediation script, so on Linux check each named artifact directly and remove what you find in the same order: tunnel processes, persistence, key, then credential rotation from a clean machine.
On every platform, also look for the unauthorized key in ~/.ssh/authorized_keys and check whether the local SSH service was turned on when it should not have been. Phorion notes that a login through the tunnel would appear in SSH logs as coming from the local machine itself, authenticated with the planted key — so a localhost login with that key in the logs is evidence of use, not a false alarm to dismiss.
What to do about credentials
Rotate from a clean machine. That means: do not type new passwords, tokens, or keys into the affected machine, and do not rotate from a session running on it, until the key, the persistence files, and the tunnel processes are gone and the remediation script exits cleanly. Start with anything the affected user account could reach: repository credentials, cloud keys, API tokens, and sessions. The Phorion advisory names the same priority — credentials matching the environment variable names the payload inventoried, such as names containing KEY, TOKEN, SECRET, PASS, AWS, or GCP — because the beacon told the operator which kinds of credentials lived on the machine, even though it sent names only, not values.
If you are unsure whether the machine was used through the backdoor, rotate anyway. The notice's step is to rotate credentials accessible from affected hosts, and it does not condition that step on proof of a login.
Limits
- This page covers only the two versions and the one marketplace named in Cursor's notice. It says nothing about other extensions, other versions, or other marketplaces.
- 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.
- The remediation scripts are the vendor's. If a script exits with a non-zero status, something remains, and the machine is not clean yet.
- Rebuilding a host is a judgment call the notice leaves to you, based on what the search finds. This page does not make that call for you.
Related playbooks
- Ship a first feature with Claude Code
- Refactor a messy function with an agent, keeping behaviour
- A trojanized Claude Code extension stole SSH keys
- Claude Code sent your email to websites
Sources
Sources: Cursor security notice: malicious version of Anthropic.claude-code (2.1.312 and 2.1.313), Phorion advisory: Official Claude Code Extension Compromise.
Back to: Coding playbooks hub · Also: Vet a skill before you install it · Security-review your own code with Claude Code