Hopp til hovedinnhold

Fake Claude Code extension in Cursor planted an SSH backdoor for up to 5,000 users

A tampered Claude Code extension sat in Cursor's marketplace for eleven hours and tried to install an SSH backdoor. Cursor asks affected users to check their machines and rotate keys: uninstalling is not enough.

Av Joachim HøgbyKilde: Cursor

A tampered version of Anthropic's Claude Code extension sat in Cursor's extension marketplace for about eleven hours on 29 October. Cursor says up to 5,000 users may be affected. The extension tried to install a persistent SSH backdoor on Mac and Windows machines. Cursor is asking anyone who installed version 2.1.312 or 2.1.313 to check their machines, clean them up and rotate the passwords and keys that were reachable from them.

What happened

In its security notice, Cursor says the tampered extension was available from about 2:27am to 1:35pm Pacific time on 29 October, roughly 10:27 to 21:35 Norwegian time. It affected the Anthropic.claude-code package in versions 2.1.312 and 2.1.313 for Windows and macOS. Anthropic did not develop these versions.

According to Cursor, the code in the fake extension collected the hostname, username, operating system, home directory, environment variable names, Git email and public IP address. It also tried to add an attacker-controlled SSH key to the user's authorized_keys file, turn on the local SSH service, open a reverse SSH tunnel and make that tunnel persistent through startup mechanisms in macOS and Windows.

Microsoft Threat Intelligence has analysed the same code. Microsoft writes that the collection sent the names of environment variables containing words such as KEY, TOKEN, SECRET and AWS, not their values. That reveals which kinds of secrets existed on the machine, but does not prove that the secrets themselves were stolen.

How serious is it

Cursor says bugs in the malicious code and the need for administrator rights meant the SSH service was not switched on for most Mac and Windows machines. In those cases the attacker could not log in through the tunnel. At the same time, Cursor writes that the extension still added the attacker's key, installed persistent scripts and sent machine details to the attacker.

The server the attacker used has been taken down together with the hosting provider, according to Cursor. The company removed the fake version, shut down the whole marketplace, rotated its own keys, rebuilt the marketplace and brought it back online. Cursor says its review found no sign that other extensions had been tampered with.

Microsoft confirms that the fake packages were never published in Microsoft's Visual Studio Marketplace or on npm, and writes that Anthropic has confirmed its own systems were not compromised. According to Microsoft, all evidence points to the incident being limited to Cursor's marketplace.

What IT teams need to do now

The most important advice from both sources is that uninstalling the extension is not enough. The scripts that restart the backdoor live outside the extension's own folder and keep running.

Cursor asks affected organisations to:

  • check whether the key labelled svc-telemetry is present in the SSH authorized_keys file on machines running Cursor
  • isolate machines showing traces of the backdoor and assess whether they should be rebuilt
  • remove unauthorised keys, startup scripts and tunnel processes using the scripts Cursor has published
  • rotate passwords, keys and sessions that were reachable from affected machines, from a trusted machine

In its post on X, Cursor asks all customers to update to Claude Code for VS Code version 2.1.314.

What leaders should take away

The incident shows that extensions in AI coding tools are a real way into the organisation. An extension that appears to come from a well-known vendor can run code with the developer's rights on a machine that often has access to source code, cloud services and production keys.

Microsoft recommends that organisations using Cursor restrict extensions to approved publishers and add a waiting period before newly published versions can be installed. For Norwegian organisations the first step is to get an overview of who uses Cursor and which extensions are installed. If that overview is missing, it is the first task.

Cursor has not said how the attacker got the fake version into the marketplace. Nor has it said how many of the up to 5,000 users actually ended up with the key or the startup scripts installed.

Sources and media

Illustration: AI-generated with Grok Bot / hogby.ai

Mer om Cursor

Oppskriften. Strategien. Hver dag.

AI-nyheter for ledere. Kuratert av en CIO som bygger det selv. Daglig i innboksen.