Trojanized Claude Code Extension Hit Up to 5,000 Cursor Users
TL;DR
- Cursor's own disclosure names both 2.1.312 and 2.1.313 as malicious, expanding the affected install base beyond the single version cited in initial reporting.
- The malicious builds were distributed exclusively through Cursor's proprietary marketplace; the Microsoft VS Code Marketplace, Open VSX, and Anthropic's own channels were never affected.
- Coding errors in the malware's SSH routines likely prevented remote access on many Windows and macOS machines, making the confirmed-compromised population smaller than the 5,000 exposure figure.
A trojanized build of Anthropic's official Claude Code VS Code extension sat in Cursor's marketplace for most of October 29, exposing up to 5,000 developers to a reverse-SSH backdoor delivered as a routine auto-update. The Hacker News reported that version 2.1.313 of anthropic.claude-code, served only through Cursor's own extension marketplace between 2:27 a.m. and 1:35 p.m. PT, carried a 66-line loader stitched in front of the legitimate code.
The payload wrote an attacker-controlled public key labeled 'svc-telemetry' to ~/.ssh/authorized_keys, opened a reverse tunnel to 134.209.82.225, and beaconed host details to the same IP on port 8099 over unencrypted HTTP. It persisted differently per OS: scheduled tasks on Windows, crontab entries on Linux, and a LaunchAgent on macOS. The loader also scraped environment-variable names matching KEY, TOKEN, SECRET, PASS, AWS, or GCP back to the operator.
"The package identifies itself as anthropic.claude-code version 2.1.313, but its main JavaScript bundle contains a malicious 66-line loader inserted before the legitimate extension code," said Jenn Gile of OpenSourceMalware. The blast radius had a soft ceiling: enabling the local SSH service needs admin rights, which the extension lacked on most macOS and Windows hosts. "On those hosts the step fails and the attacker could not have logged in through the tunnel," Cursor said, while noting the SSH key, persistence, and host-detail exfil still landed.
Cursor pegged the exposure at "at most 5,000 users" and said "this malicious version of the extension was not developed by Anthropic." Anthropic published a clean 2.1.314 to Open VSX and the Microsoft VS Code Marketplace on October 30.
"It was pulled very quickly," Gile said, "but anyone who has their Claude Code instance set to auto-update could have consumed the malware."
What others are reporting
-
Cursor Read →
First-party disclosure naming both malicious versions, with authoritative detection commands, IoCs, and remediation scripts unavailable in third-party reports.
The extension runs malicious code that attempts to install a persistent SSH backdoor.
-
BleepingComputer Read →
Reports coding errors in the malware's SSH routines likely blocked remote access on many Windows and macOS machines, narrowing the confirmed-compromised population below the 5,000 ceiling.
Coding errors in the malware's SSH routines likely prevented attackers from gaining remote access on many Windows and macOS systems.
-
ThreatDefence Read →
Explicitly corrects initial reports attributing distribution to Open VSX, confirming the breach was limited to Cursor's proprietary marketplace only, with remediation scripts and hunting indicators.
The tampered build was never on Open VSX, the Microsoft marketplace or any of its own distribution channels.
-
StepSecurity Read →
Provides version-level threat intelligence distinguishing malicious builds (2.1.312, 2.1.313) from clean 2.1.314, with published scanning tooling for immediate enterprise-wide detection.
On load it planted an attacker SSH key, set up persistence on each OS, opened a reverse SSH tunnel to attacker infrastructure.
-
Help Net Security Read →
Cites Phorion CEO Calum Hall on the IIFE injection technique that hid malicious code inside the minified bundle, explaining why standard code review missed it.
The compromised extension.js file starts with an injected immediately invoked function expression (IIFE) prepended to the minified extension bundle.
-
OpenSourceMalware Read →
Deep technical forensics including file hashes, per-OS persistence mechanisms, and an attack-chain table providing the most granular malware analysis in the sibling set.
The extension activates after VS Code startup and runs malicious code that adds an attacker-controlled SSH key to the user's system.
Originally reported by thehackernews.com
Read the original article →Original headline: Trojanized Claude Code VS Code Extension 2.1.313 Planted Persistent SSH Backdoor on Up to 5,000 Developer Machines