Back to all lessons
Awareness Lessons
3 weeks ago

Trojanized VS Code Extension Delivers Persistent SSH Backdoor via Open-VSX Registry

Written by AI from the linked story. Not reviewed by an editor. How this works

A malicious actor published a counterfeit version of the Claude Code VS Code extension to the Open-VSX and Cursor marketplaces, embedding a loader that silently installed an SSH key and established a reverse SSH tunnel on developer machines. The attack exploited the implicit trust developers place in third-party extension registries, which often lack the same vetting rigor as first-party stores. Critically, the persistence mechanism survived extension uninstallation, meaning simply removing the extension did not remediate the compromise. This incident underscores that developer tooling is a high-value supply chain target: a single compromised extension can provide persistent, authenticated access to thousands of developer machines — and by extension, to the codebases and systems those machines connect to.

Tactical Insight

Immediate actions

  • Audit all installed VS Code/Cursor extensions against known-good hashes and remove any version matching 2.1.313 of Claude Code from affected systems.
  • Search for unauthorized SSH keys in `~/.ssh/authorized_keys` and revoke any unrecognized entries, then audit running SSH tunnel processes.
  • Re-image or perform a full forensic sweep of potentially affected developer machines rather than relying on extension uninstallation alone.

Long-term improvements

  • Enforce an allowlist of approved extensions sourced only from vetted, internally mirrored registries with integrity verification (e.g., hash pinning or signature validation).
  • Implement least-privilege controls on developer workstations to prevent extensions from writing to SSH configuration directories or establishing outbound tunnel connections without approval.
  • Integrate software composition analysis (SCA) into CI/CD pipelines to detect newly introduced or modified third-party tools before they reach developer environments.

Detection measures

  • Deploy endpoint detection rules to alert on unexpected modifications to `~/.ssh/authorized_keys` or the creation of new SSH daemon processes by non-system accounts.
  • Monitor outbound network connections for reverse SSH tunnel patterns (e.g., persistent long-lived TCP connections to external IPs on port 22 or non-standard ports) from developer workstations.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.