Claude Code trapped in Cursor: a persistent SSH backdoor
A modified version of Claude Code circulated in the Cursor marketplace for about 11 hours. It added an SSH key, attempted to open an outgoing tunnel, and planted persistence mechanisms.
Cursor removed a malicious version of the Claude Code extension, detected on October 29, 2026, in its marketplace, after it installed a persistent SSH backdoor on developers’ machines. According to Phorion, package 2.1.313 added a key to authorized_keys, attempted to open a reverse tunnel to 134.209.82.225, and dropped persistence files on macOS, Linux, and Windows. The sensitive point is not only the access theft: the extension executed as soon as it loaded, before any user interaction.
A code extension that touches SSH keys is not a good sign
The compromised bundle targeted VS Code-compatible editors distributed via Cursor. Phorion describes a minified extension.js file with a prefixed code block, enough to launch the payload as soon as Node loads the extension. In short, the trap triggers even before the user opens a Claude conversation. The script creates or modifies the ~/.ssh folder, adds a commented Ed25519 key svc-telemetry to authorized_keys, and prepares a backdoor for the attacker if SSH is accessible.
The detail matters because the extension does not rely on a single mechanism. It also installs an embedded private key to initiate an outgoing tunnel, then maintains everything with hidden files and startup tasks. A code editor that starts tinkering with your SSH keys is never for improving your ergonomics.
Why the risk depends on the SSH state on the machine
The backdoor does not systematically open an incoming session. On macOS, Phorion spotted a bug in the Remote Login check: the script runs systemsetup -getremotelogin without privileges, receives an error message, and mistakenly interprets this output as if SSH were already enabled. Result: on a machine where Remote Login is disabled, the code can skip the step that should have activated it. According to Phorion, this reduces the impact on many Macs but does not protect machines where SSH was already available or those where the user would enable it later.
Cursor indicated that administrator rights were required to activate SSH on most Macs and Windows PCs, limiting cases where the tunnel actually worked. Still, the key was deposited, persistence scripts too, and that is often where lasting trouble begins.
What the code sets up in the background
The scenario observed by Phorion follows four steps. First, the extension pushes a public key into authorized_keys. Then, it attempts a reverse SSH tunnel to 134.209.82.225 with port forwarding to localhost:22. Next, it installs a persistence mechanism depending on the system. Finally, it sends a host report to an HTTP endpoint, with basic information about the machine and user.
On macOS, persistence is via a LaunchAgent named com.apple.sysmond.plist in ~/Library/LaunchAgents, which launches a hidden script from ~/.config/.smt. On Linux, the script adds an @reboot entry in the user’s crontab. On Windows, it tries to create a scheduled task SysMon running as SYSTEM, then falls back to a script placed in the Startup folder if that fails.
- October 29, 2026: exposure of the malicious package in Cursor.
- Affected version: 2.1.313, according to Cursor and Phorion.
- Tunnel server: 134.209.82.225.
- macOS persistence: com.apple.sysmond.plist.
- SSH indicator: svc-telemetry key in authorized_keys.
The report sent to the operator remains discreet but useful
Phorion indicates that the HTTP beacon does not leak environment secrets. It only sends variable names that look like tokens, passwords, or cloud credentials, filtering on KEY, TOKEN, SECRET, PASS, AWS, and GCP. The script also collects hostname, user, system, architecture, home directory, current directory, global Git email, and public IP address. This is enough to prioritize the most interesting machines for an operator.
The report is sent in clear HTTP to /beacon, both to the attacker’s address and, less clearly, to 127.0.0.1:8099. Phorion notes that no local service is visible for this second flow. For collection, the attacker does not need a sophisticated C2: the SSH tunnel does most of the work, the beacon mainly signals that the machine is ready.
How to find the artifact, then remove it cleanly
Uninstalling the extension is not enough. Keys, startup scripts, and scheduled tasks remain on the machine. Cursor recommends searching for version 2.1.313, checking authorized_keys for the svc-telemetry entry, and cleaning persistence artifacts according to the system. Phorion adds that processes ssh, autossh, or /bin/sh loops restarting the tunnel must also be killed.
Teams must also delete ~/.config/.smt and ~/.config/.smtk, remove the LaunchAgent on macOS, erase the SysMon task or startup script on Windows, and delete temporary files .stk_*. If SSH was active or if an incoming login occurred, the machine must also be considered compromised and credentials accessible from that account rotated. SSH logs are useful: a successful access via the tunnel will appear as coming from localhost.
According to Cursor, the incident affected at most 5,000 users for about 11 hours, then the marketplace was audited, rebuilt, and put back online. The lesson, however, is less comfortable: a development extension can read SSH keys, cloud tokens, and entire repositories. One too many clicks is not always a click; sometimes it’s an automatic update.