SSH Backdoor Found in Claude Code Extension on Cursor Marketplace
Original source
Backdoor in Claude Code for VS Code extension on the Cursor Marketplace
Hacker News →Hackers compromised the official Claude Code for VS Code extension on the Cursor Marketplace (version 2.1.313), injecting malicious code that installs an SSH backdoor. Cursor removed affected releases from its marketplace, NPM, and the VS Code extension registries. The backdoor targets macOS, Linux, and Windows, establishing persistence mechanisms and outbound communication for host reconnaissance.
The malware executes automatically when the extension module loads, without requiring any user interaction. It follows a four-stage attack: first adding an attacker-controlled Ed25519 public key (labeled svc-telemetry) to ~/.ssh/authorized_keys with restricted permissions (0700 on the directory, 0600 on the file). The code then attempts to enable SSH through platform-specific commands—systemctl on Linux, systemsetup via sudo on macOS, and PowerShell on Windows. A critical bug undermines the macOS step: the script tries to check SSH status without elevated privileges, triggering an administrator-access error. Since the response doesn’t match the expected “Off” string, the script incorrectly treats this as “SSH is already on” and never attempts to enable it.
In the second stage, the malware creates a reverse SSH tunnel to 134.209.82.225 using an embedded Ed25519 private key (svc-telemetry-tun). It writes the tunnel key to a temporary file with a name derived from an MD5 hash of the hostname and home directory, configuring remote port forwarding (-R *:0:localhost:22) to allocate ports dynamically. While the macOS SSH detection flaw prevents full functionality if Remote Login isn’t already running, the persistence components and beacon mechanisms remain active. Organizations should immediately check for version 2.1.313 installations and initiate incident response for any discovered use.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.