All research
Threat IntelDetection

Claude Code: The Backdoored Extension

A technical look at Claude Code 2.1.313 on Cursor: the injected loader, SSH persistence, reverse tunneling, and what the evidence actually supports.

Claude Code: The Backdoored Extension

On October 29, 2026, a version of the Claude Code extension offered through Cursor's marketplace carried something unrelated to developer productivity: a small JavaScript loader designed to establish persistent SSH access on developer workstations. The package identified itself as anthropic.claude-code@2.1.313 and retained the expected extension functionality, making it a particularly consequential example of tampering inside a trusted development workflow.

Cursor's incident notice states that the affected package was available between approximately 2:27 a.m. and 1:35 p.m. Pacific Time on October 29 (09:27–20:35 UTC), potentially exposing up to 5,000 users. That figure is not a count of successfully compromised machines. Cursor removed the version, rebuilt and reviewed marketplace infrastructure, and coordinated a shutdown of the attacker's server.

The key technical issue is the extension's execution context. A development environment can have direct access to source repositories, SSH identities, cloud sessions, build infrastructure, and deployment credentials. A relatively small modification to extension code can therefore inherit access to sensitive assets without the attacker first breaking into a conventional server.

At a glance

OpenSourceMalware's static examination identified a 66-line loader prepended to the legitimate extension.js bundle. It executed when the extension module loaded. It did not require an npm postinstall script or a conversation with Claude Code.

The loader attempted to append an attacker SSH public key to authorized_keys, enable a local SSH service, set up a reverse SSH tunnel to 134.209.82[.]225, install platform-specific persistence, and POST host information to an HTTP beacon. These are documented attempts and capabilities, not proof that every step succeeded on every machine. Cursor specifically reported implementation and permission limitations that prevented SSH enablement on many ordinary macOS and Windows hosts.

The distinction matters. The failed service-enablement step did not necessarily roll back key installation or persistence. Removing the extension alone was not sufficient remediation.

Scope: which distribution channel was affected?

The confirmed source was the Cursor Extension Marketplace. Cursor states that the malicious version was not developed by Anthropic and that its review found no evidence of other marketplace extensions having been tampered with.

Early reporting confused the Cursor package with Open VSX, npm, and Microsoft's VS Code Marketplace. That broader claim is not supported by the available publication records. Socket examined Open VSX history and npm package metadata and found no corresponding 2.1.313 publication record, while OpenSourceMalware corrected its original distribution attribution to Cursor. The existence of a malicious build under the same extension identifier does not demonstrate compromise of every official distribution channel.

Field Documented scope
Extension ID anthropic.claude-code
Malicious version 2.1.313
Confirmed channel Cursor Extension Marketplace
Exposure window October 29, 2026, 02:27–13:35 PT
Potentially exposed users Up to 5,000 (Cursor's estimate)
Published VSIX indicators darwin-arm64, win32-x64
Attacker infrastructure 134.209.82[.]225 (reported offline)
Responsible actor Not publicly attributed
Means of marketplace tampering Not publicly established

Inside extension.js

The malicious code sat in front of the extension's expected JavaScript bundle as an immediately invoked function. The published analysis identified ordinary Node.js modules for spawning processes, handling files, collecting host information, and making HTTP requests.

That placement made module load the critical execution event. A defender monitoring only package-manager install hooks could miss the malicious activity altogether. Exception handling in the injected stage suppressed many errors, allowing the legitimate bundle to continue loading when malicious commands failed. A developer could therefore continue working without seeing an obvious failure.

Attack-flow diagram from Cursor marketplace distribution through local modification and attempted reverse SSH communication

The behavior can be understood as four connected stages: loader execution, host reconnaissance, local access and persistence changes, and outbound communications. How the local changes were implemented depended on the operating system.

Reconnaissance: what actually left the host?

The loader collected hostname, username, OS and CPU architecture, home-directory and working-directory paths, configured Git email, and the system's public IP. It also examined environment-variable names containing terms such as KEY, TOKEN, SECRET, PASS, AWS, and GCP.

According to Cursor and the independent analysis, the initial beacon did not directly include the values of those environment variables. This is a significant limit on the observed first-stage collection. Names can still disclose the presence of cloud accounts or CI/CD configuration, but they are not the credentials themselves. Interactive access, if successfully established, could have enabled broader collection; public evidence does not demonstrate that outcome across the exposed population.

Planting an SSH identity

The loader tried to create or update the user's SSH authorization file with an attacker Ed25519 public key. Cursor published the exact key:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry

The key fingerprint is:

SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk

The svc-telemetry comment gives the entry a plausible operational appearance. The loader attempted conventional SSH permissions (0700 for .ssh, 0600 for authorized_keys) and avoided adding a duplicate when the marker was already present. This exact key is a strong investigative pivot because it is specific to the malicious package.

Reverse forwarding: outbound traffic used to create a path back in

The second SSH identity in the loader was used to initiate an outbound connection to tunnel@134.209.82[.]225 over TCP/22. A documented command pattern was:

ssh -N -R '*:0:localhost:22'

In SSH remote forwarding, a client connects to an external server and requests that a port on that server forward traffic back to a local destination. Here, the intended destination was the compromised workstation's localhost:22. The workstation would not have needed an inbound Internet-facing SSH port for that design to work. The invocation also included options such as StrictHostKeyChecking=no, UserKnownHostsFile=/dev/null, and keepalives.

Where available, the loader attempted to use autossh -M 0; related scripts retried failed connections approximately every 60 seconds. Cursor reports that the enablement stage could fail on normal systems because of implementation errors and missing administrator privileges. The appropriate conclusion is an attempted reverse-SSH backdoor, with actual interactive access dependent on host state and privileges.

Platform-specific persistence

Technical comparison of macOS and Windows persistence artifacts

On macOS, the documented artifacts include ~/.config/.smt, ~/.config/.smtk, a temporary .stk_* key, and ~/Library/LaunchAgents/com.apple.sysmond.plist. Its label, com.apple.sysmond, resembles a legitimate system component.

The Windows branch attempted a scheduled task named SysMon, with a Startup-folder sysmon.cmd fallback, alongside %USERPROFILE%\.config\smt.cmd, %USERPROFILE%\.config\smtk, and %TEMP%\.stk_*. SysMon here is an attacker-chosen name and must not be mistaken for the legitimate Sysinternals Sysmon product.

Independent static analysis also describes a Linux code path that uses files under ~/.config and an @reboot cron entry. A Linux code path is not evidence that a malicious Linux VSIX was distributed through Cursor. The official incident notice published indicators for macOS and Windows builds.

The beacon and what it did not do

The injected code attempted HTTP POST requests to hxxp://134.209.82[.]225:8099/beacon and a loopback fallback, 127.0.0[.]1:8099/beacon, reporting system details and backdoor status. It used legitimate public-IP lookup endpoints such as ifconfig.me and api.ipify.org.

The published static analysis found no secondary executable downloaded by this stage and no path that executed commands returned by /beacon. The persistence scripts and SSH material were embedded or generated locally. That finding constrains the behavior of the injected loader; it does not exclude actions an operator might have taken over a working SSH session.

Indicators of compromise

The modified VSIX hashes below are reported in Cursor's public notice and independently reproduced in subsequent incident write-ups. The hashes for the modified JavaScript bundle and embedded private key come from OpenSourceMalware's analysis rather than Cursor's own IOC table. That provenance is preserved here intentionally.

Package and artifact hashes

Artifact Indicator Source
Affected identity anthropic.claude-code@2.1.313 Cursor Marketplace exposure
macOS darwin-arm64 VSIX SHA-256 432ccdee3801f99e52b8fe31f69ea9870118e96ea7ef9ecabed1479621b5ab62 Cursor
macOS VSIX MD5 da5469c4221775e9fe2e413e59ca7fd9 Cursor
Windows win32-x64 VSIX SHA-256 3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081 Cursor
Windows VSIX MD5 bd3b71ddf3d0cc3af76249afd2c0eda1 Cursor
Modified extension.js SHA-256 ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15 OpenSourceMalware; independent
Embedded tunnel key SHA-256 7e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278 OpenSourceMalware; independent

Network, SSH, and process pivots

Type Indicator Meaning
Infrastructure 134.209.82[.]225 Attacker endpoint; reported offline
SSH 134.209.82[.]225:22 Outbound reverse-tunnel destination
HTTP hxxp://134.209.82[.]225:8099/beacon Host-reconnaissance POST
Loopback 127.0.0[.]1:8099/beacon Local fallback, not external C2
Public key comment svc-telemetry Unauthorized entry in authorized_keys
Public key fingerprint SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk Planted key identity
Tunnel key fingerprint SHA256:KOAU57+ZG6u3MG4WwzPzPX2O5YEe9qdOC1Bl+6MVyDQ Outbound SSH identity
SSH arguments ssh -N -R '*:0:localhost:22' Remote port forwarding
Tunnel monitor autossh -M 0 Attempted tunnel supervision
Windows task schtasks /create /tn SysMon Scheduled-task persistence attempt
macOS service setup systemsetup -setremotelogin on Remote Login enablement attempt

File and persistence pivots

Platform Files / services
macOS ~/.ssh/authorized_keys, ~/.config/.smt, ~/.config/.smtk, $TMPDIR/.stk_*, ~/Library/LaunchAgents/com.apple.sysmond.plist
Windows %USERPROFILE%\.ssh\authorized_keys, %USERPROFILE%\.config\smt.cmd, %USERPROFILE%\.config\smtk, %TEMP%\.stk_*, SysMon task, Startup sysmon.cmd
Linux (code path only) ~/.config/.smt, ~/.config/.smtk, /tmp/.stk_*, @reboot cron entry

Context is essential. A task named SysMon is not intrinsically malicious, and visits to ifconfig.me or api.ipify.org are not incident-specific indicators. Correlate artifacts with their parent processes, timing, exact contents, and network activity.

Detection opportunities

The strongest hypothesis combines an IDE extension-host process, a newly created SSH authorization entry, and ssh or autossh launching remote forwarding toward the known destination. The VSIX hash is useful for exposure scoping, but persistence may remain after package removal. Conversely, a clean current network state does not clear the October 29 exposure window: Cursor says the attacker's server has since been taken down.

Microsoft Defender XDR — historical C2 connections

DeviceNetworkEvents
| where Timestamp >= datetime(2026-10-29)
| where RemoteIP == "134.209.82.225"
| project Timestamp, DeviceName, InitiatingProcessFileName,
          InitiatingProcessCommandLine, RemoteIP, RemotePort,
          ActionType
| order by Timestamp asc

Microsoft Defender XDR — SSH forwarding attempts

DeviceProcessEvents
| where Timestamp >= datetime(2026-10-29)
| where FileName in~ ("ssh.exe", "ssh", "autossh", "autossh.exe")
| where ProcessCommandLine contains "134.209.82.225"
   or (ProcessCommandLine contains " -R "
       and ProcessCommandLine contains "localhost:22")
| project Timestamp, DeviceName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          AccountName

Microsoft Defender XDR — filesystem artifacts

DeviceFileEvents
| where Timestamp >= datetime(2026-10-29)
| where FileName in~ ("authorized_keys", "com.apple.sysmond.plist",
                       "smt.cmd", "smtk", ".smt", ".smtk", "sysmon.cmd")
   or FileName startswith ".stk_"
| project Timestamp, DeviceName, ActionType, FolderPath, FileName,
          InitiatingProcessFileName, InitiatingProcessCommandLine

These are starting points, not drop-in high-fidelity rules. Coverage depends on the telemetry collected and retained from the relevant operating system. File event data generally cannot establish the contents of authorized_keys; the svc-telemetry key requires content inspection or suitable forensic artifacts. An absence of observed events is not proof that the malicious package was never loaded.

A read-only check on macOS can inspect the user's SSH authorization file:

grep -nF 'svc-telemetry' "$HOME/.ssh/authorized_keys" 2>/dev/null

A negative result is not sufficient to rule out exposure, especially if the key was removed, execution failed early, or another local account was involved.

MITRE ATT&CK mapping

Technique ID Evidence
Account Manipulation: SSH Authorized Keys T1098.004 Unauthorized key insertion
Protocol Tunneling T1572 Attempted reverse SSH forwarding
Create or Modify System Process: Launch Agent T1543.001 macOS LaunchAgent
Scheduled Task/Job: Scheduled Task T1053.005 Windows SysMon task attempt
Boot or Logon Autostart Execution: Startup Folder T1547.001 Windows Startup fallback
System Information Discovery T1082 OS and host reconnaissance
Application Layer Protocol: Web Protocols T1071.001 HTTP POST beacon

We intentionally do not claim cloud credential exfiltration, lateral movement, or successful interactive SSH logins as universally observed behavior. Those are credible follow-on risks only if the access path worked and the attacker used it.

The developer workstation as a trust boundary

Conceptual illustration of the possible reach of an attacker with interactive access to a developer machine

Developer workstations may store repository tokens, SSH keys, registry credentials, cloud CLI sessions, infrastructure configuration, and CI/CD secrets. This is a map of potential access rather than an assertion that every exposed endpoint lost these assets.

Investigators should distinguish a package installation from payload execution, payload execution from a successful tunnel, and successful tunneling from confirmed operator activity. Each step changes the evidentiary threshold for credential rotation, investigation scope, and host rebuilding.

Sources

  1. Cursor: Official incident notice (October 29, 2026)
  2. OpenSourceMalware: Trojanized Claude Code Extension Plants an SSH Backdoor (October 30, 2026)
  3. Socket: Cursor Removes Malicious Claude Code 2.1.313 Extension From Its Marketplace (October 30, 2026)
  4. Cursor: Marketplace extension controls
  5. MITRE ATT&CK: techniques

OffPerimeter

Climate is which supply-chain story is loud this week. Posture is whether your developer machines already sit on the path to repositories, SSH keys, and cloud sessions.

https://offperimeter.com

OffPerimeterResearch by OffPerimeter
PRIVATE BETABeta access for a limited time

From research to your own exposure.

Explore your attack surface, credential exposure and threat intelligence with OffPerimeter.

Request Beta
OffPerimeterOFFPERIMETER BRIEF

Stay one signal ahead.

New research on exposure, credentials and emerging threats.

New researchUnsubscribe anytime