Official Claude Code Extension Compromise Security Advisory
Score: 9/10

Official Claude Code Extension Compromise Security Advisory

A trojanized version of the Claude Code for VS Code extension (2.1.312 and 2.1.313) on the Cursor Marketplace drops persistent SSH backdoors and exfiltrates host reconnaissance data across macOS, Linux, and Windows.

Executive Summary

Phorion has identified a significant supply chain compromise affecting the official Claude Code for VS Code extension distributed via the Cursor Marketplace. The backdoored versions, 2.1.312 and 2.1.313, contain an injected JavaScript payload that executes immediately upon the IDE loading the extension module. This compromise enables unauthorized interactive access to developer environments, posing a critical risk to source code integrity and local credentials.

The attack chain involves planting an attacker-controlled SSH public key in the user's authorized_keys file and establishing an outbound reverse SSH tunnel to a command-and-control (C2) server. While a coding error in the macOS implementation may prevent the malware from enabling the SSH service if it is currently off, the persistence mechanisms—including LaunchAgents on macOS, crontab on Linux, and scheduled tasks on Windows—ensure the backdoor remains active. Furthermore, the malware beacons host reconnaissance data, including public IP addresses and environment variable names related to cloud providers and secrets.

Organizations using the Cursor editor or the Claude Code extension should immediately audit their environments for the affected versions. Impacted systems require comprehensive remediation, as simply uninstalling the extension does not remove the dropped persistence artifacts or the planted SSH keys.

Key Details

Threat Name

Claude Code Extension Compromise

Affects

—

Adversary

—

Malware/Tools

Claude Code for VS Code (trojanized)

Report Score

9out of 10
Quality Score
Excellent
IOC Quality10
TTP Details10
Detection Guidance6
Enterprise Relevance10
Clarity & Structure10
Technical Depth9

Sources