Tampered Claude Code Extension Shipped Through Cursor's Extension Marketplace - Code Planted an SSH Key, and Uninstalling May Not Be Enough
On October 29, 2026, Cursor said tampered builds of Anthropic.claude-code (2.1.312 and 2.1.313, for Windows and macOS) had been available in its VS Code extension marketplace. The code added an attacker's SSH key and set up persistence, and Cursor published scripts to check for and clean up infections. An Anthropic employee said the company's own systems were not compromised.
On October 29, 2026, the AI coding tool Cursor published a security notice saying that tampered copies of the Claude Code extension from Anthropic had been distributed through its own VS Code extension marketplace 1. The affected builds are Anthropic.claude-code 2.1.312 and 2.1.313, built for Windows and macOS. According to Cursor, Anthropic did not develop these builds.
They were available from roughly 2:27 a.m. to 1:35 p.m. Pacific Time on October 29 1, which is 09:27 to 20:35 UTC the same day 2. The tampered builds carried code that sent machine details to an outside server and tried to stay on the machine by planting the attacker’s SSH key. Anyone using the Claude Code extension in Cursor should check whether they installed or updated to one of those versions during that window.
What the malicious code did
Cursor’s notice says the tampered extension tries to set up a persistent SSH backdoor 1. Specifically, it:
- Gathers details such as the hostname, username, OS, home directory path, the names of environment variables, working directories, the email configured for Git, and the public IP, and reports them to the attacker
- Adds the attacker’s public SSH key to
authorized_keys, enables SSH on the machine, and tries to set up a reverse SSH tunnel - Tries to make that tunnel persistent through a LaunchAgent on Macs and a scheduled task on Windows, retrying the connection about every 60 seconds
Turning on the SSH service requires administrator rights. Cursor says this step fails on the majority of Mac and Windows PCs, so the attacker could not log in through the tunnel. Even so, the key was added, the persistence was installed, and the host details were sent, so Cursor asks everyone affected to clean up. According to the company, the attacker’s server was taken down with help from its hosting provider and no longer functions.
Only the names of environment variables were collected, not their values. Cursor nonetheless says this does not rule out the attacker reaching credentials later through the backdoor.
How to check and what to do
Cursor’s guidance applies to anyone who, during the window above on October 29, put 2.1.312 or 2.1.313 on a Mac or Windows PC through Cursor’s marketplace, whether as a new install or an update 1.
To check, look in your SSH authorized_keys file for a public key labeled svc-telemetry. If it is there, the machine is affected. The notice includes commands for this check and a cleanup script for each OS. Run the macOS script as the affected user rather than as root, and run the Windows script from a PowerShell window opened as administrator. The scripts delete the extension along with its persistence setup, any running tunnel and the planted key, and they return a non-zero exit code if anything is left behind.
Two points in the notice are easy to miss:
- Removing the extension alone may not be enough. The tampered build drops separate persistence scripts that keep running after the extension is gone. Updating to a newer extension version does not clear them either 2
- Rotate the credentials and sessions that were reachable from an affected machine, and do it from a different, trusted machine
For managed fleets, the notice lists indicators of compromise (IOCs), including hashes of the tampered VSIX files, the attacker’s IP address and the persistence files for each OS. Cursor recommends searching endpoint and network logs for them, isolating machines that show signs of infection, and then deciding whether to rebuild those machines.
Anthropic’s account, and what is still unknown
According to The Register, Anthropic staff member Felix Rieseberg said on X that neither Anthropic’s systems nor employee laptops had been breached 2. In his account, someone with access to Cursor’s marketplace put up the tampered copy, which Anthropic neither built nor published; the versions on Anthropic’s official channels were unaffected, and only Cursor users were affected.
How the tampered copy came to be published as Anthropic’s extension in the marketplace had not been explained by either Cursor or Anthropic as of The Register’s article. The same article reports that the EDR vendor Phorion was the first to spot it.
Cursor says it pulled the tampered builds and stopped distribution as soon as it detected them, then took the whole marketplace offline as a precaution 1. It audited access, confirmed that no other extensions had been altered, rotated its keys and rebuilt the marketplace before bringing it back. The notice was updated on October 30 to revise the IOCs and the list of affected versions.
A tampered build under a legitimate publisher name
The tampered builds were distributed as Anthropic’s extension in the “Cursor VS Code Extension Marketplace,” which Cursor runs. The incident shows that an extension can be swapped for a tampered build somewhere along the distribution path even when the publisher name is the real one. Cursor announced on August 14, 2026 that SpaceX had completed its acquisition of the company 3. This notice states explicitly that “SpaceXSI products” such as Grok are not affected 1 (see our earlier coverage for how Cursor relates to the SpaceXSI subscription).
In September, details were published of a problem in which opening an untrusted repository in Claude Code could run commands outside the macOS sandbox. That was a vulnerability in the tool itself. This case is different in kind: the problem was not a flaw in the tool but a distributed package that had been tampered with.
The first step is to find out which machines run the Claude Code extension in Cursor, then check whether an affected version was installed on October 29 and whether authorized_keys contains an unfamiliar key. Until the intrusion path is explained, the incident is also likely to prompt a review of how updates to extensions on development machines are managed.
Sources
- Security notice — malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) identified in the Cursor VS Code Extension Marketplace - Cursor official blog (October 29, 2026; updated October 30)
- Anthropic: That Claude Code extension compromise… couldn’t be us - The Register (October 30, 2026)
- Cursor is now a part of SpaceX - Cursor official blog (August 14, 2026)
Was this article helpful?
Thank you!
Received. Thank you!