Cursor pulls Claude Code malware, says up to 5,000 users affected
Cursor identifies tampered Claude Code extension versions 2.1.312 and 2.1.313 for macOS and Windows and offers checks and cleanup scripts for exposed developers.

In this article
Cursor removed tampered copies of Anthropic’s Claude Code extension after an 29 October 2026 incident that the marketplace operator says affected at most 5,000 users. The packages used the coding assistant’s legitimate extension identity, so developers could receive the malware as an update rather than as a separate imitation.
Cursor’s updated security notice identifies versions 2.1.312 and 2.1.313, with confirmed packages for macOS ARM64 processors and Windows x64 processors. The malicious updates were available for approximately 11 hours, from about 02:27 to 13:35 Pacific Daylight Time on 29 October [13:27 29 October to 00:35 30 October Yerevan time], Cursor said.
The user ceiling is not a count of successful attacker logins. Microsoft’s analysis says remote access depended on administrator privileges, the workstation’s remote-access settings and the attacker’s server configuration. Malicious keys and startup scripts could remain even when access failed.
What the malicious extension tried to do
Microsoft found that the inserted code runs when the extension loads, before its normal startup code. It attempts to create a backdoor using Secure Shell, or SSH, a tool for remote login. An unauthorized SSH key would let its holder access the developer’s account if the local SSH service allowed it.
The malware also attempts an outbound reverse tunnel: a connection from the workstation to the attacker’s server that provides a route back into the workstation. Successful access could let the attacker run commands or transfer files. Startup scripts attempt to restore that connection after it stops or the user logs in again.
Cursor said enabling SSH required administrator rights that the extension lacked on most macOS and Windows hosts, preventing login through the tunnel on those machines. It said the extension nevertheless added the attacker’s key, installed startup mechanisms and sent host details, making cleanup necessary.
Phorion’s analysis, described by BleepingComputer on 30 October, identified additional setup errors. On macOS, a permissions error caused the malware to skip enabling remote login. On Windows, it tried to use a Unix command shell unavailable on standard installations. These failures did not prevent key installation or startup changes, and did not protect machines where SSH was already running.
Cursor said the malware sent computer and user names, operating-system details, directory paths, the configured Git email address and the public IP address. Microsoft found that it sent selected environment-variable names, not their values. These variables are software settings that can hold credentials; their names reveal configuration categories but do not demonstrate theft of the secrets themselves.
How to check and clean an affected device
Developers who installed or automatically updated the affected packages should consult Cursor’s security notice. It supplies package fingerprints—digital identifiers for matching files—and checks for the attacker’s SSH authorization key, labeled svc-telemetry. Cursor says finding that key confirms impact. Microsoft cautions that a missing label alone is not enough to clear a device; installation records, running processes, network activity and startup changes also need review.
Updating or uninstalling the extension alone does not remove malicious files written outside its installation folder. Microsoft advises preserving evidence before cleanup. Cursor recommends these steps:
- Isolate devices showing evidence that the malicious code ran or installed a backdoor.
- Remove the unauthorized SSH key, malicious startup mechanisms and running tunnel processes. Assess whether the device needs rebuilding.
- From a trusted system, replace credentials and revoke or renew sessions accessible from the affected device. Limited collection of environment-variable names does not rule out later credential access through the backdoor.
| Platform | Script | How to run it |
|---|---|---|
| macOS | remediate-macos.sh | As the affected user, not as root, the system’s highest-privilege account. |
| Windows | remediate-windows.ps1 | In PowerShell opened with Run as Administrator. |
Cursor says the scripts remove the malicious extension, startup mechanisms, tunnel processes and attacker key, and return an error status if anything remains. Microsoft advises reviewing the scripts before use and verifying that the malicious files and startup entries do not return after login or restart.
The companies' response and the remaining investigation
Cursor said it blocked distribution immediately after detection and shut down the marketplace. It then audited access, confirmed that no other extensions had been tampered with, rotated its own keys, rebuilt the marketplace and restored service. It also worked with the hosting provider to take the attacker’s server offline, disabling the reverse connection and information reporting to that server. Microsoft warns that the takedown does not remove changes already made to devices.
Anthropic technical staff member Felix Rieseberg said on 30 October that the company was working with Cursor and denied that Anthropic’s systems or employee laptops had been compromised. In a statement carried by The Register, he said an attacker used access to Cursor’s marketplace to publish a tampered copy that Anthropic neither built nor published. The attacker’s identity and the exact way the package reached the legitimate extension identity remain unknown.
Microsoft confirmed that its Visual Studio Marketplace and the Claude Code npm distribution did not distribute the malicious packages. The Hacker News corrected its initial attribution to Open VSX and said there was no evidence the malicious update reached that registry. It also reported that Anthropic had published the clean version 2.1.314 to Open VSX and Microsoft’s marketplace by 30 October 2026, and that no other follow-on payloads had been observed.
Microsoft’s recovery guidance calls for reviewing remote-login, command and file activity on affected devices to determine whether further access occurred. Cursor said it would contact impacted users directly.
Earlier in Technology
InfrastructureHong Kong carrier HKT agrees to end US services by 1 September 2027
HKT must apply to the US telecommunications regulator within 30 days to discontinue services. The agreement replaces the regulator’s pursuit of revocation with a scheduled withdrawal.
2 min
InfrastructureNscale discloses $44.6 billion Anthropic data center contract
Nvidia is discussing a proposed debt guarantee to help Nscale finance construction and electricity at the West Virginia campus.
2 min
CompaniesAlphabet posts negative third-quarter free cash flow of $9.1 billion
Quarterly capital spending rose to $51.4 billion as Search advertising growth slowed to 12%, its weakest pace in five quarters. Alphabet forecasts up to $205 billion in capital spending for 2026.
1 min
Sources
Show all 5 sourcesShow fewer
- The Hacker NewsOfficial Claude Code Extension on Cursor Marketplace Trojanized with Persistent SSH Backdoor
- cursor.comSecurity notice — malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) identified in the Cursor VS Code Extension Marketplace · Cursor
- microsoft.comInside a malicious Claude Code-branded extension and its persistent SSH backdoor | Microsoft Security Blog
- BleepingComputerMalicious Claude Code extension on Cursor planted SSH backdoors
- The RegisterAnthropic: That Claude Code extension compromise… couldn't be us
