Backdoor Found in Claude Code VS Code Extension

Original: Backdoor in Claude Code for VS Code extension on the Cursor Marketplace

Why This Matters

Supply-chain attacks via IDE extensions give attackers immediate access to source code and developer credentials.

Phorion security firm discovered a persistent SSH backdoor in Claude Code for VS Code v2.1.313 on the Cursor Marketplace, affecting macOS, Linux, and Windows. Cursor pulled the extension from its marketplace and removed NPM/VSCode registry versions.

Security firm Phorion has identified a supply-chain compromise in the official Claude Code for VS Code extension (version 2.1.313) distributed via the Cursor Marketplace. The malicious code was injected as an immediately invoked function expression (IIFE) prepended to the legitimate, minified extension bundle — meaning it executes the moment Node.js loads the file, before any user interaction or the extension's normal activate callback fires.

The payload uses standard Node.js modules (child_process, fs, os, path, http, crypto) to drop an attacker-controlled Ed25519 SSH public key — commented 'svc-telemetry' — into ~/.ssh/authorized_keys, then establishes persistence and beacons host reconnaissance data back to the operator.

On macOS, the backdoor contains a notable implementation bug: it attempts to check Remote Login status using systemsetup -getremotelogin without root privileges. Run as a standard user, that command returns an admin-access error and exits with status 0 rather than printing 'Off.' Since the script only enables SSH when it sees 'Off,' it skips activation entirely on machines without SSH already running — partially limiting inbound access, though persistence and key installation still complete.

Cursor has since removed version 2.1.313 from its marketplace and pulled associated NPM and VS Code registry entries. Phorion recommends organizations immediately audit environments for use of the affected version and initiate incident response where it is found.

Source

phorion.io — Read original →