GrepBoard/Manuals
605 manuals ·

Cursor Claude Code extension 2.1.312/313 malware: check and clean

·updated ·Tested on Cursor official notice and remediation scripts · check commands tested with dummy data on Ubuntu 24.04 (Docker) · 2026-10·Test scope ↓·5 steps

How to check for the malicious Anthropic.claude-code 2.1.312 or 2.1.313 from Cursor's marketplace: find svc-telemetry in authorized_keys and run the cleanup.

If authorized_keys contains a svc-telemetry public key, the machine is impacted. Uninstalling the extension does not finish the job: run Cursor's official remediation script, then rotate credentials from a different machine. The source is the Cursor security notice (posted 2026-10-29, updated 10-30 at 11:30 am PT).

ItemWhat the notice covers
ExtensionAnthropic.claude-code 2.1.312 or 2.1.313
SourceCursor VS Code Extension Marketplace
OSmacOS, Windows
Installed or updated2026-10-29, about 2:27 am to 1:35 pm PT
Same window, converted09:27 to 20:35 UTC

The notice says Anthropic did not develop these versions, and that there is no evidence other versions or the official distribution are affected. It does not discuss the official VS Code marketplace separately. The 10-30 update changed the indicators and clarified the affected versions, so write-ups copied from the earlier text may not match.

On 11-13 Cursor published an incident update. It says at most 5,000 users who requested specific cached versions on October 29 potentially received the malicious build, which was available for approximately 11 hours, and that Open VSX, the marketplace source, never had the malware. The last attacker activity was on November 1 and was blocked, and the Cursor app and its official updates were not affected. The warning that uninstalling the extension alone may not be enough still stands.

[1] Search for the key with the notice's commands. On macOS (the output comes from a test file with a dummy key):

console
$ grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"svc-telemetry key found

On Windows, in PowerShell:

console
PS> $files = "$HOME\.ssh\authorized_keys", "C:\ProgramData\ssh\administrators_authorized_keys" | Where-Object { Test-Path $_ }PS> if ($files -and (Select-String svc-telemetry $files)) { "svc-telemetry key found" } else { "No key found; machine not impacted" }

svc-telemetry key found means the machine is impacted. Go to [3]. On a shared Mac, repeat for each account.

[2] Check the indicators even without a key (step 2 in the notice). No key found only reflects authorized_keys, and you get the same text when that file does not exist. The remediation script's comment says the tampered bundle "keeps the real version number", so match the extension by content, not by folder name.

console
$ grep -l svc-telemetry ~/.*/extensions/anthropic.claude-code-*/extension.js/home/dev/.cursor/extensions/anthropic.claude-code-2.1.313-darwin-arm64/extension.js
console
PS> Get-ChildItem "$HOME\.*\extensions\anthropic.claude-code-*\extension.js" -Force -ErrorAction SilentlyContinue | Select-String -Pattern svc-telemetry -SimpleMatch -List | Select-Object Path

A printed path means a tampered extension. An extension you already removed will not show up. Compare hashes, fingerprints and full command lines with the indicators section of the notice.

WhereIndicator in the notice
macOS~/.config/.smt · ~/.config/.smtk · ~/Library/LaunchAgents/com.apple.sysmond.plist
Windows%USERPROFILE%\.config\smt.cmd · %USERPROFILE%\.config\smtk · scheduled task SysMon · sysmon.cmd in Startup
Processesssh -N -R '*:0:localhost:22' · autossh -M 0
Network134[.]209[.]82[.]225 on TCP 22 · port 8099 /beacon

[3] Isolate any machine that shows evidence. The notice says the attacker server is offline and that enabling local SSH mostly failed for lack of rights. The key, the persistence and the host-detail report still happened, so "Follow the remediation steps below regardless".

[4] Run the official remediation script. First keep a copy with cp -p ~/.ssh/authorized_keys ~/authorized_keys.before-cleanup (Copy-Item on Windows). ⚠️ The copy also holds the attacker key, so never restore it whole. If a legitimate key goes missing, move only that key from the copy into authorized_keys, then run [1] again to confirm svc-telemetry is gone. Delete the copy once your own login works.

  • macOS: download remediate-macos.sh and run bash remediate-macos.sh as the affected user, not root, once per affected user
  • Windows: close all editors, download remediate-windows.ps1, and in an elevated PowerShell run powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1 (it cleans every profile)
Last lineNext
done: backdoor removedRun [1] again, then go to [5]
clean: no backdoor foundNothing the script looks for was found. Compare with [1] and [2]
incomplete: see errors above (warnings on Windows)Exit code 1. Fix what the messages say and rerun

The tampered extension is removed, so reinstall after cleanup if you need it. note: something listens on localhost:22; the tunnel exposed it means port 22 is listening locally right now. As read from the script on 11-01, it prints this when it found or removed traces and port 22 is open afterwards; it is not evidence that a tunnel ever connected. The notice's claim that the attacker could not log in through the tunnel assumes local SSH could not be enabled. If this line appeared, or Cursor ran with admin rights, that assumption cannot be confirmed. The notice gives no rebuild criteria, so treat such a machine as a rebuild candidate, and weigh actual connection evidence with it.

This compares a line delete with the official script's substitution, on the same state built from dummy keys. KEY here is a dummy value; the official script sets the real attacker key itself.

console
$ cat ~/.ssh/authorized_keysssh-ed25519 AAAAdummyRealKey user@example.comssh-ed25519 AAAAdummyAttackerKey svc-telemetry$ sed '/svc-telemetry/d' ~/.ssh/authorized_keys | wc -c0$ export KEY="ssh-ed25519 AAAAdummyAttackerKey svc-telemetry"$ perl -0pe 's/^\Q$ENV{KEY}\E\n//mg; s/\Q$ENV{KEY}\E//g' ~/.ssh/authorized_keysssh-ed25519 AAAAdummyRealKey user@example.com

The line delete left 0 bytes and took the real key with it. The substitution kept the real key.

Windows needs one more look. Step [1] also reads C:\ProgramData\ssh\administrators_authorized_keys, but remediate-windows.ps1 as of 2026-10-31 fixes only .ssh\authorized_keys in each profile and never opens that file. If [1] still finds the key after cleanup, inspect it.

console
PS> Select-String svc-telemetry C:\ProgramData\ssh\administrators_authorized_keys

If it matches, make a copy, open the file in an elevated Notepad, and remove only the ssh-ed25519 … svc-telemetry key that matches the public key in the notice. The copy also holds the attacker key, so do not restore it whole: if a legitimate key goes missing, move only that key, then delete the copy. The notice gives no procedure for this file and this edit was not tested, so ask security@cursor.com if you are unsure.

[5] Rotate credentials and sessions the affected machine could reach, from a trusted system. The notice gives no list, so walk through that machine's SSH keys, Git tokens, cloud keys and login sessions. Only environment variable names were collected, but the notice says this does not rule out later credential access over the backdoor.

Where the check gets confusing

  • **The scripts also scan folders like ~/.vscode.** They look at extensions under every dot folder in the home directory, and the header says "VS Code-based editors". The notice does not present that as impact, so do not read it as proof that VS Code installs were infected.
  • The indicators include Linux paths. /tmp/.stk_<10 hex> and a cron @reboot line are listed, but the affected OS list, check commands and scripts cover only macOS and Windows. Linux has no verdict procedure, so check those paths yourself and contact security@cursor.com if they appear.
  • The command from [1] exits with status 0 whether it matches or not. The trailing echo runs last. When you put it in a script, decide from the output text, not the exit code.
  • A key glued onto a normal key is missing from the fingerprint list. If you try to match ssh-keygen -lf output against Unauthorized key fingerprint in the indicators, a file built with a dummy key appended without a newline gives this:
console
$ wc -l < ~/.ssh/authorized_keys1$ grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"svc-telemetry key found$ ssh-keygen -lf ~/.ssh/authorized_keys256 SHA256:5jlqzC+kRbgZsaMe//0Pr8ErsTFBMLRvwfv+HaV/P0k user@example.comssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq2EeL7JHvnbq0+XeBcrTkNDbJWQBHYufS+37ijG6Gm svc-telemetry (ED25519)

It is one line, so only the normal key gets a fingerprint and the appended key shows up as comment text. In that case the fingerprint comparison is useless; trust the grep result.

For authorized_keys format and permissions, see Debug SSH public key denied.

Analyze your auth.log (SSH) log in the browser ↗ — nothing is uploaded.

Check it with the ssh_config generator tool ↗ — calculated in your browser.

#cursor#claude-code#vscode-extension#ssh#authorized_keys#supply-chain