Malicious Claude Code extension in Cursor (October 2026): am I affected, and how do I clean up?

On 29 October 2026 Cursor's extension marketplace served tampered copies of Anthropic's Claude Code extension (versions 2.1.312 and 2.1.313) to macOS and Windows users for about 11 hours. The builds tried to plant an SSH backdoor. If you use Cursor with the Claude Code extension, here's how to check in one command, what to do if you're hit, and what is still unknown.

Severity: high Status: Active Disclosed 29 Oct 2026

Short answer

Run one check: on macOS or Linux, grep -qs svc-telemetry ~/.ssh/authorized_keys && echo found || echo clean. If it prints found, your machine got the malicious build: run Cursor's remediation script, check whether the machine should be rebuilt, and rotate every credential that machine could reach (GitHub, cloud, AI and hosting tokens, .env secrets), from a different, trusted device. Uninstalling the extension isn't enough, because the payload installs startup scripts outside the extension folder. Cursor says the attacker's server is offline and that on most machines the backdoor couldn't open SSH without admin rights, but the key, the persistence and a report of your host details (including the names, not values, of secret-looking environment variables) were still written or sent. Cursor hasn't said how the tampered build got into its marketplace.

What happened (confirmed by Cursor and Microsoft)

Cursor's security notice and Microsoft Threat Intelligence's analysis agree on the following. Times are from Cursor's notice (Pacific time) converted to UTC and CET.

  • 29 Oct 2026, about 09:27–20:35 UTC (2:27am–1:35pm PT): a maliciously modified Anthropic.claude-code extension, versions 2.1.312 and 2.1.313 for Windows and macOS, was available in the Cursor VS Code Extension Marketplace. Cursor first named only 2.1.313 and added 2.1.312 in an update on 30 Oct.
  • The builds were not made by Anthropic. Microsoft says Anthropic confirmed its systems were not compromised, and that the malicious packages were never published to Microsoft's Visual Studio Marketplace or to npm @anthropic-ai/claude-code. Microsoft says all evidence points to the incident being limited to Cursor's marketplace.
  • When the extension loaded, injected code ran before the real extension. It collected hostname, username, OS, architecture, home and working directories, global Git email and public IP, plus the names of environment variables that look like secrets. Microsoft says it matched names containing KEY, TOKEN, SECRET, PASS, AWS or GCP, kept up to 40, and sent names only, not values.
  • It added an attacker SSH key labelled svc-telemetry to your authorized_keys, tried to switch on the local SSH server and open a reverse SSH tunnel, and set up persistence: a LaunchAgent named com.apple.sysmond on macOS, a scheduled task SysMon (with a Startup-folder fallback) on Windows. Retry scripts reopen the tunnel about every 60 seconds.
  • The extension kept working normally, so nothing looked wrong in the editor.
  • Cursor removed the builds, shut the marketplace down, audited it and says no other extensions were tampered with, rotated its keys, rebuilt the marketplace and brought it back. It worked with the hosting provider to take the attacker's server offline.

How bad is it?

Cursor says enabling the local SSH server needs admin rights, which the extension doesn't have on most macOS and Windows machines, and that errors in the malicious code made that step fail unless Cursor was started as administrator. On those machines the attacker could not log in through the tunnel. The attacker's server is now offline, so the tunnel and the host-details upload no longer work.

That doesn't make an affected machine clean. Cursor says the extension did add the attacker's key, install persistence and send your host details, and Microsoft notes the loader writes those files even when the tunnel fails. Both say to follow the remediation steps regardless, and Cursor adds that the limited environment-variable collection “does not rule out later credential access over the backdoor”.

Check your Mac (or Linux machine) in one command

This is the check from Cursor's notice. It looks for the attacker's key in your SSH authorized keys. Cursor's indicators list the same key file for Linux, so the command works there too.

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

To see which Claude Code version Cursor has installed, list the extension folder: ls ~/.cursor/extensions | grep -i anthropic.claude-code. A folder for 2.1.312 or 2.1.313 alone doesn't prove anything: those version numbers also exist as legitimate builds elsewhere. The svc-telemetry key is the signal Cursor uses.

Check your Windows PC

Cursor's PowerShell check looks in both places Windows keeps authorized SSH keys:

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" }

Microsoft adds that a missing key shouldn't be the only thing you look at on managed company machines; if you have endpoint security tooling, check it for the indicators in Cursor's notice too.

Key found? Clean up in this order

These steps follow Cursor's “What you should do” list and Microsoft's remediation guidance.

  1. Disconnect the machine from the network if you can, so nothing else talks to it while you work.
  2. Download Cursor's remediation script from Cursor's own security notice (not from a link in an email, chat or repo): remediate-macos.sh on macOS, run as your normal user, not root; remediate-windows.ps1 on Windows, from PowerShell opened as administrator. Cursor says the scripts remove the malicious extension, the persistence, the running tunnel processes and the attacker's SSH key, and exit with a non-zero status if anything remains.
  3. Check it worked: run the key check again, and confirm the persistence files are gone. On macOS: ~/Library/LaunchAgents/com.apple.sysmond.plist, ~/.config/.smt, ~/.config/.smtk. On Windows: the SysMon scheduled task, sysmon.cmd in your Startup folder, and smt.cmd and smtk in %USERPROFILE%\.config. On Linux: an @reboot crontab line pointing at ~/.config/.smt.
  4. Update Claude Code in Cursor to a current version. Anthropic published 2.1.314 on Open VSX on 30 Oct (01:07 UTC); Open VSX listed 2.1.318 as the latest on 4 Nov.
  5. Decide whether to rebuild the machine. Cursor says to assess it, and Microsoft recommends a rebuild when you can't restore trust in the device. If Cursor ever ran as administrator on it, or you see SSH logins you don't recognise, rebuild.
  6. From a different, trusted device, rotate the credentials the affected machine could reach (checklist below).

What to rotate if you were affected

On a vibe coder's laptop the valuable things are tokens that deploy and pay for your app. Create the new credential first, update it where your app runs, then revoke the old one.

  • SSH keys: generate a new key pair, add the new public key to GitHub (or GitLab) and any servers, then delete the old one there.
  • GitHub: revoke personal access tokens and sign out of other sessions in your account settings; check the security log for activity you don't recognise.
  • AI provider keys (Anthropic, OpenAI, OpenRouter, Google and others) in .env files or your shell profile: create new keys, delete the old ones, check usage and billing, and set a spending limit where the provider offers one.
  • Hosting and database CLIs logged in on that machine (Vercel, Netlify, Cloudflare, Railway, Supabase, Firebase): revoke their access tokens in each dashboard and log in again.
  • Cloud credentials (AWS, Google Cloud, Azure): rotate access keys and review recent activity logs.
  • App secrets in local .env files: Stripe secret and webhook signing keys, database passwords, the Supabase service_role key, auth and JWT secrets. Then redeploy so the live app uses the new values.

What isn't known yet (unverified)

  • How the tampered build got into Cursor's marketplace. Cursor hasn't published a root cause; on 3 Nov a Cursor staff member on its forum said more details will come when they can share them.
  • How many people installed it. The Hacker News quotes Cursor as saying “at most 5,000 users”, and SecurityWeek cites researcher Kevin Beaumont's estimate of roughly 5,000 systems. That figure isn't in Cursor's published notice, so treat it as unconfirmed.
  • Whether anyone was actually accessed over the backdoor. Cursor says that on most machines the SSH step failed; it hasn't published how many machines, if any, it succeeded on.
  • Cursor's forum reply says affected users “likely heard directly from us”. Don't rely on the absence of an email: run the check.

Make the next bad update less likely to reach you

Microsoft recommends two Cursor controls after this incident. Both are in Cursor's extension documentation:

  • Install cooldown: set extensions.installCooldownHours in your Cursor settings so new extension versions wait a number of hours before they install. This bad build was live for about 11 hours, so a cooldown longer than that would have kept it off your machine. Team admins can enforce it under Team settings → Security & automation → Marketplace Install Cooldown (default 0, off).
  • Allowed extensions: list the publishers or extension IDs you trust in extensions.allowed; everything else is blocked. On teams, admins can enforce it through MDM (AllowedExtensions).
  • Keep fewer extensions installed. Each one runs with your user's rights and can read your files and .env secrets.
  • Don't confuse this with “testmetest”, a separate campaign JFrog reported in late October: booby-trapped GitHub repositories whose config files run malware when you open them in Claude Code, Gemini, Cursor or VS Code. Before opening an unfamiliar repo with an AI agent, look in its .claude/, .cursor/, .gemini/ and .vscode/ folders for hooks or tasks you didn't expect.

Common questions

Was the official Claude Code extension hacked?

No, according to Microsoft and Anthropic. Microsoft says Anthropic confirmed its systems weren't compromised and that the malicious builds were never published to Microsoft's VS Code Marketplace or npm. Tampered copies were served only through Cursor's extension marketplace.

I use Claude Code in VS Code or in the terminal, not Cursor. Am I affected?

Not by this incident. Microsoft says the packages on Microsoft's Visual Studio Marketplace and npm @anthropic-ai/claude-code were not affected, and all evidence suggests it was limited to Cursor's marketplace.

How do I know if Cursor installed the malicious Claude Code version?

Check for the attacker's SSH key: on macOS or Linux run grep -qs svc-telemetry ~/.ssh/authorized_keys && echo found || echo clean; on Windows use the PowerShell check on this page. Cursor says if the key is found, your machine is impacted.

Is uninstalling the extension enough?

No. Cursor says the payload drops standalone persistence scripts that keep running after the extension is removed. Use Cursor's remediation script, then confirm the key and persistence files are gone.

Were my API keys stolen?

The extension sent the names of secret-looking environment variables, not their values, according to Microsoft. But Cursor says that doesn't rule out later access over the backdoor, so if the key check finds svc-telemetry, rotate the credentials that machine could reach.

Is it safe to use Cursor's marketplace now?

Cursor says it rebuilt the marketplace, rotated its keys and found no other tampered extensions. It hasn't explained how the attacker got in yet. Setting an install cooldown and an allowlist of extensions reduces the risk from any future bad update.

Related on VibeLiftoff