Malicious Claude Code extension on Cursor planted SSH backdoors

A malicious version of Anthropic's Claude Code VS Code extension was distributed through Cursor's extension marketplace for approximately 11 hours on October 29, exposing up to 5,000 developers to malware designed to install persistent SSH backdoors.
A malicious version of Anthropic's Claude Code VS Code extension was distributed through Cursor's extension marketplace for approximately 11 hours on October 29, exposing up to 5,000 developers to malware designed to install persistent SSH backdoors.
The extension used the version number 2.1.313 and was distributed between 2:27 a.m. and 1:35 p.m. Pacific Time.
Cursor is an AI-powered code editor built from Microsoft’s open-source Visual Studio Code (VS Code), with support for VS Code extensions. Anthropic’s Claude Code extension brings its AI coding assistant directly into compatible editors, helping developers write and debug code using natural-language instructions.
Cursor says Anthropic did not develop the malicious extension but has not explained how attackers distributed the compromised package under Anthropic's name.
"Between about 2:27 am PT and 1:35 pm PT today, a maliciously modified version of Anthropic’s Claude Code extension was made available in the Cursor VS Code extension Marketplace," warned Cursor.
"The extension runs malicious code that attempts to install a persistent SSH backdoor."
Researchers at Phorion and OpenSourceMalware found that the attackers inserted a malicious JavaScript loader at the beginning of the extension's extension.js file, leaving the legitimate extension code otherwise unchanged.
The malicious code executes when the extension loads, without requiring user interaction with Claude Code.
When installed, the malicious extension performs the following actions on compromised systems:
However, according to Phorion, coding errors in the malware's SSH setup routines likely prevented attackers from gaining remote access to many affected Windows and macOS systems.
The mistakes prevented the malware from enabling SSH on machines where it was not already running, leaving the reverse tunnel unable to provide access to the compromised device.
On macOS, the malware attempts to check whether Remote Login is enabled using the systemsetup -getremotelogin command, but runs it without elevated privileges. Instead of returning the SSH service's status, the command produces an administrator-access error.
Because the malware only attempts to enable SSH when the output contains "Off," it skips the activation step entirely.
On Windows, the malware attempts to install and start the OpenSSH server through PowerShell, but it tries to do so via /bin/sh, a Unix shell that isn't available on standard Windows installations. Due to this, the SSH setup fails.
Source: BleepingComputer. This article summarizes the linked reporting; figures and quotes are attributed to the original source.