Security firm Phorion reports an SSH backdoor in the official Claude Code for VS Code extension bundle distributed through Cursor Marketplace. Its October 30 advisory names version 2.1.313 and urges organizations that find it in use to engage incident response.
The reported compromise concerns executable code installed on a developer’s machine. Phorion’s analysis does not establish a compromise of Claude’s model or hosted service. For developers, the immediate question is which extension bundle ran locally and what it left behind.
Code runs before the normal extension activation
Phorion says an injected JavaScript function sits at the start of the extension’s bundle and executes when Node loads the file, before the normal activation callback. The user does not need to interact with the extension for that code to run. It inherits the permissions of the editor and its user, including access to local source code and developer tooling.
According to the analysis, the payload adds an attacker-controlled public key to ~/.ssh/authorized_keys, then attempts to enable an SSH server. It also creates an outbound reverse SSH tunnel to an attacker-controlled server. That tunnel can carry a connection back to the machine’s local SSH service, where the planted key permits authentication.
The payload has persistence logic for macOS, Linux and Windows. On macOS, Phorion identifies a user LaunchAgent at ~/Library/LaunchAgents/com.apple.sysmond.plist and hidden files at ~/.config/.smt and ~/.config/.smtk. The initial tunnel runs in a detached process, so closing the editor can leave it running.
Phorion says Cursor removed the associated marketplace release. The advisory also reports removal of version 2.1.313 from npm and VS Code registries. It does not explain how the bundle was altered or establish the full distribution scope. Those removal claims should be read as Phorion’s account, rather than separate confirmation from the registry operators.
A broken SSH check still leaves cleanup work
On macOS, Phorion found that the payload checks Remote Login without administrator privileges. The command returns an access error instead of the expected “Off” response, so the malware skips its attempt to enable SSH. If Remote Login is already off, traffic through the tunnel reaches a closed local port.
That limits the remote access path on those machines. It still leaves the planted key and persistence files. If SSH was already enabled, or someone enables it later, the access path can work. Phorion also describes a Windows setup bug and notes that the payload contains no privilege escalation exploit.
The reconnaissance beacon sends host details and up to 40 environment variable names that match credential-related terms. Phorion says this step collects names, rather than secret values. Successful SSH access would give an operator a separate way to reach files and credentials available to the user.
Sources
- Phorion: Official Claude Code Extension Compromise: Security Advisory
- Anthropic: Claude Code by Anthropic | AI coding agent and assistant. Lead image credit: Anthropic. The product image shows the extension interface, not the reported malicious code.




