← Claude Code Hub
Oct 30, 2026 · 6 min read ✦ Tip #245

Claude Code VSCode extension 2.1.312 and 2.1.313 malware in Cursor: updating doesn't fix it

The Claude Code extension 2.1.312 and 2.1.313 that Cursor's marketplace served on October 29, on macOS and Windows, leave an attacker's SSH key and an autostart that survive the update. How to check in a minute whether your machine got them, and what to do if it did.

Updating to 2.1.314 the Claude Code extension 2.1.312 or 2.1.313 that Cursor's marketplace served on macOS and Windows doesn't clean the machine: the svc-telemetry key in authorized_keys, the LaunchAgent, the SysMon task, the .smt scripts and the temp private key stay

TL;DR If you installed or updated the Claude Code extension from Cursor's marketplace on macOS or Windows on October 29, run grep svc-telemetry ~/.ssh/authorized_keys (on Windows, the PowerShell command further down). If it prints a line, your machine installed one of the trojanized versions, 2.1.312 or 2.1.313: run Cursor's cleanup script and rotate your credentials from another computer. Seeing 2.1.314 installed today proves nothing.

Update, November 2, 2026: Cursor and Anthropic have clarified the scope: Cursor's marketplace also served a trojanized 2.1.312, only on macOS and Windows, and Open VSX served no malicious version. The check no longer looks for a version number, but for the key the payload leaves.

Versions 2.1.312 and 2.1.313 of anthropic.claude-code that Cursor's extension marketplace served on October 29, on macOS and Windows, shipped a malicious loader inside their extension.js. The editor loading the extension is enough, with no prompt sent. It appends an attacker's SSH key to your authorized_keys, installs its own autostart, and sends details about your machine to an outside server. That autostart lives outside the extension folder, so updating to 2.1.314, or uninstalling, leaves it in place.

Anthropic didn't publish them. Someone with access to Cursor's marketplace uploaded a tampered copy of the official extension under its legitimate name; Anthropic's systems and official channels weren't affected. The version number can't be trusted either: the code inside the "2.1.313" package reports itself as 2.1.312, because the attacker started from the official 2.1.312 build and only changed the number in the manifest.

Who could have received them

They were available for about eleven hours, from 2:27 to 13:35 PT (09:27 to 20:35 UTC) on October 29, and only in the macOS and Windows packages. By the channel your editor installs extensions from:

Where you install the extension Did it serve a malicious version?
Cursor on macOS or Windows, from its own marketplace Yes, 2.1.312 or 2.1.313, if it installed or updated the extension inside the window
Cursor on Linux No: Cursor only identifies malicious macOS and Windows packages
VSCodium, Windsurf, Gitpod and other Open VSX editors No: 2.1.313 was never published to Open VSX, and its 2.1.312 has been verified clean
VS Code with Microsoft's marketplace No: Anthropic confirms 2.1.313 was never published there, and its official channels weren't affected
The CLI (claude in your terminal) No: the CLI never had a 2.1.313, the changelog goes from 2.1.312 to 2.1.314

So having 2.1.312 or 2.1.313 installed proves nothing on its own. And the extension auto-updates, so whatever your extensions list shows today isn't evidence either. What counts is where and when you installed it, and what the payload left on disk.

What it leaves on your machine

Analyzed by StepSecurity and Cursor in the macOS (Apple Silicon) and Windows x64 packages. The code also carries a Linux branch, an @reboot line in the crontab, but there was no malicious Linux package:

System What it leaves
Both An ssh-ed25519 ... svc-telemetry key at the end of ~/.ssh/authorized_keys (on Windows, %USERPROFILE%\.ssh\authorized_keys), and a private key at $TMPDIR/.stk_ (on Windows, %TEMP%\.stk_) followed by 10 hex characters
macOS ~/.config/.smt, ~/.config/.smtk, and the LaunchAgent ~/Library/LaunchAgents/com.apple.sysmond.plist, named to pass for one of Apple's
Windows %USERPROFILE%\.config\smt.cmd, the scheduled task SysMon or, when it can't create one, sysmon.cmd in the Startup folder

It also tries to switch on the local SSH server and open a reverse tunnel to 134.209.82.225, retrying every 60 seconds. Turning on local SSH needs admin rights, which the extension doesn't have on most Macs and PCs, so on those the tunnel fails. The key, the autostart and the data upload work regardless. The attacker's server is already offline.

Check it in a minute

The reliable proof is Cursor's: the svc-telemetry key in your authorized_keys. A 2.1.312 folder isn't enough, because the Open VSX one is clean. On macOS, paste this block into a terminal. Each line looks for one of the traces in the table and prints nothing when it finds none; the second finds the extension by content, not by version, so it catches both the malicious 2.1.312 and 2.1.313:

grep -nF svc-telemetry ~/.ssh/authorized_keys 2>/dev/null
grep -lF svc-telemetry ~/.*/extensions/anthropic.claude-code-*/extension.js 2>/dev/null
ls ~/.config/.smt ~/.config/.smtk ~/Library/LaunchAgents/com.apple.sysmond.plist "${TMPDIR:-/tmp}"/.stk_* 2>/dev/null
pgrep -fl '\.stk_|\.config/\.smt'

A clean machine prints nothing. This is the output in a test home with the traces recreated as empty files, a sample key and a 2.1.312 folder, run on Linux:

1:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXAMPLEonlyEXAMPLEonlyEXAMPLEonlyEXAMPLE dev@laptopssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry
/Users/dev/.cursor/extensions/anthropic.claude-code-2.1.312-darwin-arm64/extension.js
/Users/dev/.config/.smt
/Users/dev/.config/.smtk
/Users/dev/Library/LaunchAgents/com.apple.sysmond.plist
/var/folders/x7/T/.stk_3f9a1c07be

Look at the first line. The payload appends its key without a newline before it, so it can end up glued to your last real key on the same line. If you clean it by hand, cut only the stretch that ends in svc-telemetry, never the whole line.

On Windows, Cursor's check 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 something shows up

1. Run the cleanup script for your system

Cursor publishes remediate-macos.sh and remediate-windows.ps1. They remove the infected extension folders (found by content, not by version number), the autostart, the dropped files, the tunnel processes and the key, and exit with an error if anything is left.

# macOS: as your own user, not with sudo
bash remediate-macos.sh
# Windows: close every editor first; PowerShell as Administrator
powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1

On macOS, if it ends with note: something listens on localhost:22, you already had local SSH on (Remote Login, for example), and the tunnel could have exposed your machine.

2. Rotate your credentials from another computer

The payload sent the names of your environment variables containing KEY, TOKEN, SECRET, PASS, AWS or GCP, your git email and your public IP. Not the values, but a map of what to go after. Rotate the GitHub, CI, cloud, package registry tokens and SSH keys used from that machine, working from one you know is clean. Cursor also advises assessing whether the machine should be rebuilt.

3. Run the check again

Run the check block again: it should finish without a single line. If you use the extension in VS Code, the native panel tip covers how it differs from the CLI in your terminal, which wasn't affected.

Sources: Cursor's security notice · StepSecurity's analysis

Official docs: Use Claude Code in VS Code

Found this useful? See more of wmedia.es in your Google results.

Add wmedia.es as a preferred source on Google
Free guide

The 51 essentials, as a guide.

One page per tip. Five chapters. What I actually use daily in production. No theory, no fluff.

  • 1. Getting started 10 tips
  • 2. Awareness 3 tips
  • 3. Mastery 22 tips
  • 4. Autonomy 15 tips
  • 5. Comparison 1 tip
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 51
#

Wmedia · 51 tips
Free guide · 51 tips · 5 chapters

The 51 essentials, as a guide.

One page per tip. Five chapters. What I actually use daily in production. No theory, no fluff.

Are you a professional Web developer? · Unsubscribe anytime
How I use AI

My Claude Code workflow.

The skills, agents and instructions I use as a professional Software Engineer. It's called Craft, and it's a plugin you can install.

See the skills

Want the 51 Claude Code essentials as a guide?