Skip to content

Tampered Claude Code extension in Cursor tried to plant an SSH backdoor

An attacker used access to Cursor's extension marketplace to publish a modified Claude Code extension that for about 11 hours tried to open persistent access to developers' machines.

By Virtuvia Editorial DeskPublished 2 min read
A code editor with a project folder open and a terminal running a script
Photo: Cycling2 / Wikimedia Commons, CC0

Key takeaways

  • On 29 October 2026 an attacker used access to Cursor's extension marketplace to publish tampered Claude Code versions 2.1.312 and 2.1.313 for Windows and macOS.
  • The code tried to add an attacker SSH key, open a reverse tunnel and collect host details; bugs meant SSH access mostly failed.
  • Anthropic says its official channels were not affected; affected users should remove the key and persistence and rotate credentials.

What happened#

According to Cursor, the malicious versions were live for about 11 hours, from roughly 2:27am to 1:35pm PT, and "were not developed by Anthropic." Anthropic said its systems and employee laptops were not compromised and that versions on its official channels were unaffected. Researchers reported that up to 5,000 Cursor users were affected. Cursor temporarily shut down its marketplace, audited access, rotated keys and rebuilt it before restoring service.

The code ran on load with no user action. It tried to add an attacker-controlled key to authorized_keys, enable SSH and open a reverse tunnel, create startup entries outside the extension folder for persistence, and collect machine and user names, OS, working directories, Git emails and the names, not values, of environment variables containing words such as KEY, TOKEN, SECRET, AWS or GCP.

Why it mostly failed, and what to do#

On macOS it checked Remote Login with a command that needs admin rights, so it usually skipped enabling SSH; on Windows a bug in the SSH setup command could stop it. Cursor warns that key planting, persistence and host data exfiltration could still succeed.

  • check authorized_keys and remove unknown keys by fingerprint, not by their comment;
  • remove startup entries and scripts it created, because uninstalling alone is not enough;
  • update the extension and rotate any credentials or tokens that may have been exposed;
  • review logs for logins with unfamiliar keys.

Editor's note: this article was prepared with AI tools, including Anthropic models; facts come from Cursor, Anthropic and independent researchers.

Why it matters#

This is another software supply-chain attack, now aimed at AI coding tools, whose extensions have broad access to files, terminals and credentials. A similar case was the compromised LiteLLM package. Experts recommend treating extension marketplaces as part of the supply chain: publisher verification, integrity checks, allowlists, controlled updates and short-lived credentials.

Source and further reading

  1. Cursor removes malicious Claude Code extension after SSH backdoor attempt— CSO Online
  2. Malicious Claude Code extension in Cursor plants SSH backdoor— OX Security
  3. Cursor confirms Anthropic Claude Code extension compromised— BankInfoSecurity
  4. Trojanized Claude Code extension plants persistent SSH backdoor— OpenSourceMalware

Tags