A Fake Claude Code Extension Sat in Cursor's Marketplace for 11 Hours and Planted an SSH Backdoor on up to 5,000 Developer Machines


The extension was real, worked normally, and was not Anthropic’s

If you use Cursor with Claude Code, there is a check to run today. On October 29, a tampered copy of Anthropic’s Claude Code extension sat in Cursor’s extension marketplace for about 11 hours, from roughly 2:27 a.m. to 1:35 p.m. Pacific time. Cursor says versions 2.1.312 and 2.1.313, for macOS and Windows, reached up to 5,000 users in that window, many through automatic updates they never clicked on.

The package looked and behaved like the real one. StepSecurity found the build identical to the official extension except for a small loader in its extension.js file, about 7 kilobytes larger than the previous release. That loader ran when the extension module loaded, before the legitimate code, with no prompt or click required. The extension then worked normally, which is what a supply chain attack needs: nothing to notice.

Cursor, Microsoft and Anthropic agree on the boundary, worth stating plainly because early reports blurred it. Anthropic’s systems were not compromised, and Anthropic did not develop the malicious package. Microsoft confirmed the tampered packages were never published on the Visual Studio Marketplace or through npm, and all evidence so far limits the incident to Cursor’s marketplace. Neither company has yet said how the attacker got access to publish under the extension’s name there, and that unanswered question is the centre of the story.

What the loader did, in order

Microsoft Threat Intelligence published a full teardown of the injected JavaScript on October 30. The sequence is methodical:

  • Reconnaissance first. On loading, the loader collected the hostname, username, operating system, architecture, home and working directories and the machine’s global Git email. It also scanned environment variable names for terms such as KEY, TOKEN, SECRET, PASS, AWS and GCP, keeping up to forty matches. Microsoft is careful here: the reporting callback sent the variable names, not their values. That reveals what kinds of secrets a machine holds, without proving the secrets were taken.
  • An SSH key planted. The loader checked the user’s authorized_keys file for a key commented svc-telemetry. If missing, it appended an embedded Ed25519 public key, authorising whoever holds the matching private key to log in, subject to the machine’s SSH settings.
  • A tunnel out. A second private key, written to a hidden temporary file named .stk_ plus ten characters derived from the hostname and home directory, authenticated an outbound connection requesting reverse forwarding back to port 22 on the victim’s machine. Starting outbound matters: the attacker did not need the machine reachable from the internet, only able to call out. The loop retried every sixty seconds.
  • Persistence outside the extension. On macOS, a user LaunchAgent disguised as com.apple.sysmond, with scripts at ~/.config/.smt and ~/.config/.smtk. On Windows, a scheduled task named SysMon, a fallback sysmon.cmd in the Startup folder, and matching files under the profile’s .config folder. Microsoft’s table also lists a Linux crontab mechanism, though Cursor puts the affected builds on macOS and Windows.
  • A delayed report home. After the access and persistence attempts, a callback sent the collected host details to the attacker’s server. Every step suppressed output and swallowed errors, and a failed step did not stop the next one, which is why nobody can declare themselves clean from a single missing symptom.

”The attacker probably never got in” is not an all clear

There is genuinely good news here, and Cursor stated it clearly. Turning on the local SSH service needs administrator rights, and errors in the malicious code meant that step failed on most macOS and Windows machines, unless the editor itself had been launched with elevated privileges. Cursor also worked with the hosting provider to take the attacker’s server offline, so the tunnel and reporting endpoint no longer function. A clean version, 2.1.314, was published in the early hours of October 30.

None of that cleans a machine that received the bad build. The attacker’s key and persistence scripts were still written to disk on most affected machines, and the host inventory was still sent while the server was up. Cursor’s own wording is that the limited collection does not rule out later credential access over the backdoor. Microsoft adds the point every developer should internalise: the artifacts live outside the extension’s installation directory, so removing or updating the extension does not remove them, and the server takedown does not remove what is already on a device.

One detail argues for caution: StepSecurity examined the 2.1.312 build on one registry and found it clean, while Cursor lists it among the bad versions in its own marketplace. If either version passed through your Cursor install on October 29, treat the machine as in scope and check.

The check, and the cleanup behind it

Start with one command. On macOS or Linux, run:

grep svc-telemetry ~/.ssh/authorized_keys

On Windows, check both the authorized_keys file in your profile’s .ssh folder and, where it exists, C:\ProgramData\ssh\administrators_authorized_keys. No output means that key is not there. A match means the machine received the payload. Microsoft advises confirming the key against the published fingerprint in its indicators of compromise before removing it, because the svc-telemetry label is just a comment and can be edited.

Then work the full list, because the key is only one artifact:

  • Preserve evidence first on a work machine: the extension package, the modified authorized_keys file, the generated keys and scripts, and the startup entries, before deleting anything. Isolate machines that show signs the loader ran.
  • Remove the persistence, not just the extension: the com.apple.sysmond LaunchAgent on macOS, the SysMon scheduled task and Startup folder sysmon.cmd on Windows, the .smt, .smtk and smt.cmd files, and any temporary .stk_ identity files, and stop any live tunnel or retry loop tied to them. Cursor publishes remediation scripts for macOS and Windows that do this and report if anything remains. Read any script before running it.
  • Rotate from a clean device if the investigation shows credential access, or if you cannot restore trust in the machine: passwords, tokens and sessions reachable from that workstation. Microsoft’s guidance is blunt that a rebuild is the right answer when trust cannot be restored.
  • Verify after a restart that the key, startup entries and tunnel do not come back. Persistence that survives cleanup was the entire point of the design.

Cursor says it removed the affected versions, temporarily shut its marketplace, audited its other extensions, rotated its keys and rebuilt the service. The right moves, made after 5,000 machines had already been served the file.

This is the attack the industry described a year ago

A year ago, researchers at Wiz reported leaked publisher credentials across more than 500 VS Code extensions and warned that a stolen token could push a malicious update across an entire install base under a trusted name. At the time it was a described risk. On October 29 it arrived in that exact form, aimed at the most valuable target class in modern software: developer machines running an AI coding tool. A developer workstation holds source code, cloud credentials, signing keys and production access in one place, and its owner installs extensions by reflex and updates them automatically. Teams file extensions under convenience tooling, but a coding assistant runs with the user’s full permissions, reads the whole repository, sees environment configuration, and can execute commands. It is a privileged agent, and should be procured, pinned and monitored like one.

What to change on Monday

  • Allowlist extensions by publisher, and treat a new publisher or transferred namespace as a security event.
  • Use an installation cooldown for new versions, a control Cursor itself now recommends: let someone else run a release for its first hours before your fleet auto-updates to it.
  • Pin and stage updates for any extension that can execute code, and keep an inventory of which versions ran where, so the next incident starts with a list instead of a guess.
  • Audit authorized_keys and startup items on developer machines as you already do on servers. This attack’s entire footprint sat in those two places.
  • Ask AI tool vendors the marketplace question: who can publish under your name in each third party marketplace, how is that access protected, and how would you know within an hour if it were abused?

The bottom line

A fake version of a trusted AI coding extension spent 11 hours in a major marketplace, reached up to 5,000 developers, and left an SSH key and startup script behind on machines it touched, even though the final login step failed on most of them. Anthropic’s systems, blamed first in early reports, were never breached. The weak point was a marketplace listing and an auto-update pipeline doing exactly what they were designed to do. Run the grep, check the startup items, then fix the process that let one listing become fleet-wide code execution, because the next tampered extension will not ship with errors in its code.