Backdoored Claude Code Extension Drops SSH Backdoors in Cursor
Malicious versions 2.1.312 and 2.1.313 of the Claude Code extension on Cursor Marketplace planted persistent SSH backdoors and exfiltrated host environment variable names.
TL;DR
- Malicious versions 2.1.312 and 2.1.313 of the Claude Code extension on Cursor Marketplace planted persistent SSH backdoors on developer workstations [^1] [^2].
- Execution occurred automatically upon extension load, exfiltrating host environment variable names and establishing outbound reverse SSH tunnels [^1] [^2].
Background
Integrated development environment (IDE) extensions execute with the full privileges of the underlying user session. When an engineer installs a plugin or assistant extension, code bundled inside the package gains direct access to local files, network sockets, shell execution environments, and user credentials. Threat actors exploit this trust model by publishing backdoored versions of popular developer tools to marketplace repositories, bypassing traditional perimeter defenses.
What happened
Between 2:27 AM PT and 1:35 PM PT on October 29, 2026, compromised packages of the Anthropic Claude Code extension—versions 2.1.312 and 2.1.313—were made available on the Cursor VS Code Extension Marketplace [^2]. Researchers at Phorion identified an injected immediately invoked function expression prepended to the extension's extension.js file [^1]. The script executed automatically as soon as Node.js loaded the file, triggering payload execution before the main extension activation callback ran [^1]. Kevin Beaumont noted that the malicious extension creates a remote access Trojan targeting desktops [^3].
Upon loading, the payload appended an attacker-controlled Ed25519 public key labeled svc-telemetry to ~/.ssh/authorized_keys [^1] [^2]. It then attempted to establish an outbound reverse SSH tunnel to 134.209.82[.]225 using an embedded private key (svc-telemetry-tun), requesting dynamic remote port forwarding (-R *:0:localhost:22) [^1] [^2]. For persistent access, the payload dropped launch scripts across platforms, creating a macOS LaunchAgent named com.apple.sysmond.plist, a Linux @reboot cron job, and a Windows scheduled task named SysMon with a startup folder fallback [^1] [^2]. Finally, it transmitted host telemetry and up to 40 sensitive environment variable names to 134.209.82[.]225:8099/beacon [^1] [^2].
Implementation bugs restricted full remote access on many machines. On macOS, the malware executed unprivileged systemsetup -getremotelogin commands, which returned administrator access errors rather than expected status strings, causing the script to skip enabling the SSH service [^1] [^2]. On Windows, service creation commands were passed through a Linux shell helper [^1]. Cursor removed the affected packages, shut down the marketplace for auditing and key rotation, and worked with the hosting provider to take the attacker server at 134.209.82[.]225 offline [^2].
Why it matters
This incident highlights the structural security risks inherent to developer marketplace ecosystems. Because extensions run within active user contexts, a single compromised update grants arbitrary code execution without requiring user interaction or elevated administrative prompts. Although execution bugs in this specific payload prevented local SSH service enablement on unprivileged systems, the backdoor successfully deployed persistent scripts and exfiltrated host environment variable names.
The attack demonstrates how threat actors target developer tools as high-value supply-chain vectors. Developer workstations routinely store cloud credentials, private keys, and proprietary code repositories. Simply removing a backdoored extension from an IDE is insufficient for remediation, as standalone background processes and dropped startup scripts continue running independently after extension removal.
Practical example
Say you update your Claude Code extension in Cursor while working on a backend service on your Mac. The moment the editor loads the plugin, the hidden script appends an unauthorized SSH key to your authorized keys file and drops a persistent LaunchAgent in your user library.
Even though an unprivileged permissions error prevents the script from starting your Mac's local SSH server, the background process runs every 60 seconds and sends your hostname, user paths, and environment variable names to an external server.
When Cursor takes down the extension marketplace and revokes the package, uninstalling the extension leaves the LaunchAgent active. To fully clean your system, you must remove the dropped files, clear the planted SSH key, and kill running background processes using Cursor's remediation script.
Sources
- [1]Phorion — Official Claude Code Extension Compromise: Security Advisory
- [2]Cursor — Security notice — malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) identified in the Cursor VS Code Extension Marketplace
- [3]Kevin Beaumont on Mastodon (cyberplace.social)
- [4]Hacker News — Backdoor in Claude Code for VS Code extension on the Cursor Marketplace