Claude Code VS Code extension 2.1.313 shipped a backdoored SSH implant through the Cursor Marketplace
- Phorion found a backdoor in the official Claude Code for VS Code extension bundle published to the Cursor Marketplace as version 2.1.313, which appends an attacker-controlled Ed25519 key commented svc-telemetry to ~/.ssh/authorized_keys with 0700 directory and 0600 file permissions, then beacons host reconnaissance to the operator.
- The implant is an IIFE prepended to the minified extension.js that pulls in child_process, fs, os, path, http and crypto and runs as soon as Node loads the file, before the extension's own activate callback, so the user never has to interact with the extension.
- On macOS the SSH step fails: systemsetup -getremotelogin run without admin rights prints an administrator-access error and exits 0 instead of returning Off, so the /Off/i test never matches and the sudo -n systemsetup -setremotelogin on call is skipped, though the key and persistence still get dropped.
- The Windows path routes its PowerShell OpenSSH setup through a helper that hardcodes /bin/sh, and no platform carries a privilege escalation exploit, so non-interactive sudo -n fails unless passwordless sudo is already cached or configured.
- Cursor pulled 2.1.313 from its marketplace along with NPM and VS Code registries, and Anthropic's Dworken says only the Cursor-hosted build was affected while the official VS Code marketplace and OpenVSX were not. Commenters point out 2.1.313 has no GitHub release tag between v2.1.312 and v2.1.314 and is absent from the CHANGELOG.
Hacker News 의견들
The extension has over 27 million installs. Ouch.
How are they even going to communicate this and fix it? The affected version got yanked from the marketplace, but that does nothing for machines that already installed it. And it seems like they won't point to either.
Is this only Cursor users, or all VS Code users? The write-up only mentions the Cursor marketplace, but 2.1.313 is missing from the official VS Code marketplace too. Was that one compromised as well?
How legit is this? Feels low on details. I don't use Cursor or the extension, but plenty of people in our org use the VS Code one. How worried should I be?
Version 2.1.313 was published to the Open VSX registry on Oct 30. Security researcher Paul McCarty, aka 6mile, wrote it up on the OpenSource Malware blog, the Open VSX release was confirmed malicious, and a threat report went in for the same version on Microsoft's marketplace as a precaution.
Some more details here: doublepulsar.com/anthropic-hacked-to-deliver-remote-access-trojan.
The first two words in that URL are wrong, so I'm going to say it does not have more details.
VS Code extensions have always been terrible from a security perspective. This looks like a supply chain attack, Solar Winds style. The Claude Code harness itself wasn't compromised, right? I've been running the harness in a container with my working directory mounted and the config on a named volume, but docker work breaks it since it needs the socket, and then all bets are off.
You can start whichever container it needs yourself and let the two containers talk over docker compose without granting the docker socket, assuming the docker work is static enough. Or look at the gVisor runtime for extra security. Otherwise a full VM. I've been eyeing Gondolin for that.
Cursor has its own security notice up, and what looks like an official Binance account reported it too.
It wasn't Anthropic that got hacked, it was the Cursor Marketplace.
Cursor uses OpenVSX, which every non-Microsoft VS Code fork uses, since the official marketplace only runs in the proprietary Microsoft build. The affected Open VSX extension is owned by Anthropic employee Igor Kofman, so it's probably still Anthropic, because they control the account with release privileges.
2.1.313 is missing from the official VS Code marketplace, missing from the Claude Code GitHub CHANGELOG, and has no release tag, while v2.1.312 and v2.1.314 both exist. That's what publish-and-pull looks like, which means Anthropic was the one compromised.
From what's currently known the official marketplace build was clean, and this hit Open VSX and by extension the Cursor marketplace. Edit: now I'm not sure. The docs say unpublished versions stay publicly discoverable, and 2.1.313 doesn't show up there.
Do you have any sources for that? The post claims it also affects Open VSX.
It's been yanked from Microsoft's marketplace too, but that could just be a precaution so one version number isn't simultaneously infected and clean. I want to hear Anthropic's explanation, because of all the extension developers they should have the best tools for finding issues like this. Their own LLMs are good at finding security bugs, did nobody let them vet the code before shipping?
Dworken from Anthropic here: this only impacted the extension as it was hosted on the Cursor marketplace. It did not impact the official VS Code extension marketplace or OpenVSX.
They push an update every office day. If I installed 6 months ago and never updated, I should be fine, right?
That's a guess. Once there's an actual postmortem you'll know when the backdoor was introduced.
VS Code extensions autoupdate by default unless you disable it.
Literally impossible. With all the frontier software development tools at their disposal they should be able to ship features securely at 100x. Yet they managed to screw it up.