1. Executive Summary
A trojanized version of the Claude Code extension, identified as anthropic.claude-code version 2.1.313, was discovered in the Cursor Marketplace. The malicious version was reportedly published on October 29, 2026, and contained an injected JavaScript loader designed to establish persistent remote access to compromised developer systems.
According to the technical analysis published by OpenSourceMalware on October 30, 2026, the malicious code was inserted at the beginning of the extension's main JavaScript bundle (extension.js). It executes before the legitimate extension code, allowing the backdoor to operate when the extension loads without requiring the user to initiate a Claude Code conversation.
The malicious loader performs host reconnaissance, adds an attacker-controlled Ed25519 public key to the user's SSH authorized_keys file, attempts to enable the SSH service, and establishes a reverse SSH tunnel to the command-and-control (C2) infrastructure at 134.209.82[.]225.
The malware also implements operating-system-specific persistence mechanisms, including macOS LaunchAgents, Linux cron jobs, and Windows scheduled tasks or Startup folder entries.
The injected code reportedly transmits system reconnaissance information through an unencrypted HTTP beacon on port 8099. Its SSH tunneling mechanism provides the attacker with a potential interactive access path to the compromised system.
Following an update from Cursor, the incident was attributed to a compromise involving the Claude Code extension in the Cursor Marketplace. The report explicitly distinguishes this malicious extension from the official Claude Code npm package, Open VSX extension, and Microsoft VS Code extension, which were reported as unaffected.
2. Incident Overview
| Attribute | Details |
|---|---|
| Threat type | Trojanized developer-tool extension |
| Affected extension | anthropic.claude-code |
| Malicious version | 2.1.313 |
| Distribution platform | Cursor Marketplace |
| Initial publication date | October 29, 2026 |
| Public technical analysis | October 30, 2026 |
| Primary malware functionality | Persistent SSH backdoor |
| C2 IP address | 134.209.82[.]225 |
| C2 communication | SSH and HTTP |
| HTTP beacon port | 8099 |
| Target platforms | Windows, Linux, macOS |
The malicious code was reportedly inserted into the extension's JavaScript entry point, while the remaining extension components and bundled binary appeared consistent with the legitimate version.
The injected loader executes before the legitimate extension initialization. This design allows the expected extension functionality to continue while the malicious code performs its activities in the background.
OpenSourceMalware also clarified that the malicious behavior occurs during extension runtime rather than through npm or package-manager lifecycle scripts such as preinstall, install, or postinstall.
3. Affected and Unaffected Components
Affected
Cursor Marketplace Claude Code extension.
Extension identifier:
anthropic.claude-code.Malicious version:
2.1.313.
Reported as unaffected
Official
@anthropic-ai/claude-codenpm package.Open VSX Claude Code extension.
Microsoft VS Code extension for Claude.
Important: Users should verify the extension's installation source and version rather than assuming that every Claude Code installation is affected.
4. Technical Analysis
4.1 Malicious JavaScript Injection
The analyzed extension contained a malicious 66-line JavaScript loader inserted before the legitimate extension bundle.
The injected code uses Node.js modules to interact with the operating system, filesystem, process execution, HTTP networking, and cryptographic functionality.
The loader executes when the extension is loaded by Visual Studio Code. As a result, the user does not need to open a Claude conversation or execute a specific prompt to trigger the malicious behavior.
The malicious code also suppresses many execution errors, allowing the legitimate extension to continue loading even when certain backdoor operations fail.
4.2 Host Reconnaissance
During execution, the malware collects information about the compromised system, including:
Hostname and local username.
Operating system and CPU architecture.
Home directory and current working directory.
Global Git email address obtained through
git config --global user.email.Names of environment variables containing terms such as
KEY,TOKEN,SECRET,PASS,AWS, orGCP.
The initial beacon reportedly includes the names of potentially sensitive environment variables rather than their actual values.
However, the collected information can reveal the presence of cloud credentials, CI/CD integrations, and other sensitive development environments. If the attacker obtains SSH access, they may be able to inspect the account and its accessible resources directly.
4.3 Unauthorized SSH Key Installation
The malware creates the user's .ssh directory if required and appends an attacker-controlled Ed25519 public key to:
~/.ssh/authorized_keys
The inserted key uses the comment:
svc-telemetry
This name is designed to resemble a legitimate administrative or monitoring account.
The reported public key is:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetrySSH key fingerprint:
SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htkThe malware sets restrictive permissions on the SSH directory and authorized_keys file. It also checks for the existing marker to avoid inserting duplicate entries.
Adding an unauthorized SSH public key can provide persistent access to the victim's account without requiring the legitimate user's password, provided the associated private key is available to the attacker and SSH access is reachable.
4.4 SSH Service Enablement
The malware attempts to make the compromised system accessible through SSH.
Its behavior varies by operating system:
| Operating System | Reported behavior |
|---|---|
| macOS | Checks Remote Login and attempts to enable it using systemsetup -setremotelogin on |
| Linux | Checks for SSH services such as sshd or ssh and attempts to start them using system service commands |
| Windows | Attempts to install OpenSSH Server, configure automatic startup, and start the sshd service |
These operations may require elevated privileges and may fail if the executing user does not have sufficient permissions.
However, failure to enable SSH does not necessarily stop the remaining malicious execution flow.
4.5 Reverse SSH Tunnel Establishment
The malware contains an embedded, Base64-encoded OpenSSH private key. It decodes the key into a temporary file with a name matching the pattern:
<TMPDIR>/.stk_<identifier>
The identifier is derived from the hostname and home directory.
The malware then repeatedly attempts to connect to the attacker-controlled infrastructure:
tunnel@134.209.82[.]225The reverse SSH forwarding argument is:
-N -R '*:0:localhost:22'This configuration requests a remote port allocation and forwards connections through the SSH tunnel to port 22 on the victim's system.
The malware reportedly reconnects after 60 seconds if the connection fails. It prefers autossh on Unix-like platforms where available and otherwise uses the standard SSH client.
The SSH connection also disables host-key verification and uses the embedded private key for authentication.
This mechanism provides the operator controlling the remote SSH server with a potential interactive access path to the victim's SSH service.
4.6 Platform-Specific Persistence
The malware implements different persistence mechanisms depending on the operating system.
macOS
The malware creates the following files:
~/.config/.smt
~/.config/.smtk
~/Library/LaunchAgents/com.apple.sysmond.plistThe .smt script reconstructs the embedded SSH key and continuously launches the reverse tunnel.
A LaunchAgent named com.apple.sysmond is configured with RunAtLoad and KeepAlive properties to maintain execution.
The use of an Apple-like filename may make the persistence entry appear legitimate during a superficial review. It is not an Apple system component.
Linux
The malware creates:
~/.config/.smt
~/.config/.smtkIt also adds an @reboot entry to the user's crontab to restart the backdoor after system startup.
Windows
The malware creates:
%USERPROFILE%\.config\smt.cmd
%USERPROFILE%\.config\smtkIt attempts to establish persistence through a scheduled task named:
SysMon
The task is configured to run at startup as SYSTEM. If that method cannot be established, the malware attempts to place sysmon.cmd in the user's Startup folder.
These mechanisms allow the backdoor to resume execution after a reboot or user session restart.
4.7 Reconnaissance Beacon and Data Exfiltration
After a delay of approximately 1.5 seconds, the malware attempts to identify the system's public IP address using:
curl -s --max-time 4 ifconfig.me
curl -s --max-time 4 https://api.ipify.orgIt then sends the collected reconnaissance information in JSON format to the following endpoints:
http://127.0.0.1:8099/beacon
http://134.209.82[.]225:8099/beaconThe external HTTP beacon communicates with the C2 infrastructure over port 8099 without encryption.
The analysis found that the injected stage does not process the HTTP response to execute additional commands or download further payloads. No additional executable or script download was identified in the analyzed loader.
However, the established SSH tunnel provides an interactive access mechanism through which the attacker could potentially conduct further activities.
5. Attack Chain
The following sequence summarizes the observed malicious functionality in the analyzed extension:
Extension loading: The victim loads the malicious Claude Code extension version
2.1.313in the Cursor environment.Malicious code execution: The injected JavaScript loader executes before the legitimate extension code.
Host reconnaissance: System information, Git configuration, and selected environment-variable names are collected.
SSH key installation: The attacker-controlled
svc-telemetrypublic key is appended to the user'sauthorized_keysfile.SSH enablement: The malware attempts to enable or start SSH services.
Reverse tunnel: An SSH connection is established to
134.209.82[.]225, forwarding traffic to the victim's local SSH service.Persistence: Platform-specific mechanisms are configured to restart the backdoor after system startup.
Reconnaissance beacon: Host information is transmitted to the external C2 endpoint over HTTP port
8099.
6. Indicators of Compromise (IOCs)
The following indicators were extracted from the technical analysis published by OpenSourceMalware.
6.1 Package and Version
| Indicator | Value |
|---|---|
| Extension identifier | anthropic.claude-code |
| Malicious version | 2.1.313 |
| Marketplace | Cursor Marketplace |
6.2 Network Indicators
| Type | Indicator | Description |
|---|---|---|
| IPv4 | 134.209.82[.]225 | Reported C2 server |
| TCP Port | 22 | Reverse SSH tunnel |
| TCP Port | 8099 | HTTP reconnaissance beacon |
| URL | http://134.209.82[.]225:8099/beacon | External beacon endpoint |
| URL | http://127.0.0.1:8099/beacon | Local beacon endpoint |
| Domain | ifconfig.me | Public IP discovery |
| URL | https://api.ipify.org | Public IP discovery |
6.3 SSH Indicators
| Type | Indicator |
|---|---|
| SSH destination | tunnel@134.209.82[.]225 |
| Authorized key comment | svc-telemetry |
| SSH key fingerprint | SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk |
| Reverse tunnel argument | -N -R '*:0:localhost:22' |
6.4 File and Persistence Indicators
| Platform | Indicator |
|---|---|
| macOS/Linux | ~/.config/.smt |
| macOS/Linux | ~/.config/.smtk |
| macOS | ~/Library/LaunchAgents/com.apple.sysmond.plist |
| macOS/Linux | ${TMPDIR}/.stk_* |
| Windows | %USERPROFILE%\.config\smt.cmd |
| Windows | %USERPROFILE%\.config\smtk |
| Windows | Scheduled task SysMon |
| Windows | sysmon.cmd |
6.5 File Hashes (SHA-256)
| File / Object | SHA-256 |
|---|---|
Analyzed extension.js | ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15 |
| Embedded tunnel private key | 7e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278 |
| Analyzed directory aggregate digest | 18756b75afedee74bbf49832a1b1dada4961672c41d595be5c1bbe75709de927 |
IOC handling note: The private-key hash is an artifact fingerprint, not a file hash of a downloaded malware executable. The loopback URL is a local endpoint and should not be treated as external C2 infrastructure.
7. Potential Impact
Successful execution of the malicious extension could expose developer systems and connected environments to several security risks:
Persistent unauthorized access: An attacker-controlled SSH key could provide continued access to the compromised user account.
Credential exposure: Reconnaissance may identify the presence of cloud credentials, API tokens, secrets, and CI/CD integrations.
Source-code exposure: Developer workspaces, repositories, and project files accessible to the compromised account could be at risk.
Cloud environment compromise: Access to credentials or configuration files could create opportunities for further compromise of AWS, GCP, or other connected services.
Lateral movement: A compromised developer endpoint could become an entry point for accessing other systems and internal resources.
Long-term persistence: LaunchAgents, cron jobs, scheduled tasks, and Startup entries could allow the backdoor to survive system restarts.
Remote command execution: The reverse SSH tunnel could provide an attacker-controlled route to interact with the victim's SSH service.
The actual impact depends on the privileges of the affected user, SSH accessibility, available credentials, and any subsequent actions performed by the attacker.
8. Detection and Threat Hunting Recommendations
Security teams should prioritize identifying installations of the malicious extension version and investigating systems where the extension may have been loaded.
8.1 Extension Inventory Review
Identify developer endpoints using Cursor and Visual Studio Code.
Review installed extensions for the identifier
anthropic.claude-code.Identify installations of version
2.1.313.Review extension installation and update timestamps around October 29, 2026.
Verify the extension's installation source and compare its contents against a known-clean version.
8.2 Endpoint Threat Hunting
Search EDR and endpoint telemetry for:
Creation or modification of
.ssh/authorized_keys.The SSH key comment
svc-telemetry.Creation of
.config/.smtand.config/.smtk.Creation of the macOS LaunchAgent
com.apple.sysmond.plist.Linux crontab entries containing
@reboot.Windows scheduled task creation involving
SysMon.Creation of
sysmon.cmdin Startup directories.Execution of
ssh,autossh,systemctl,systemsetup, and PowerShell commands associated with SSH service configuration.SSH command-line arguments containing
-N -Randlocalhost:22.
8.3 Network Threat Hunting
Review network and proxy telemetry for:
Outbound connections to
134.209.82[.]225.SSH traffic to the identified C2 address over TCP port
22.HTTP connections to
134.209.82[.]225over TCP port8099.HTTP POST or other beacon activity involving
/beacon.Long-running outbound SSH sessions and periodic reconnection attempts.
DNS and HTTP activity associated with public IP discovery services such as
ifconfig.meandapi.ipify.org.
8.4 Credential and Access Review
If an affected extension was loaded:
Review SSH authentication logs for unexpected access.
Identify unauthorized SSH keys in user accounts.
Review cloud authentication logs and API activity.
Rotate potentially exposed credentials, tokens, and secrets from a known-clean system.
Inspect developer repositories and CI/CD environments for suspicious access.
Investigate possible follow-on activity beyond the known indicators.
9. Mitigation and Response Recommendations
Identify affected installations: Immediately inventory Cursor Marketplace Claude Code extension installations and identify version
2.1.313.Remove the malicious extension: Disable and remove the affected extension from identified endpoints.
Isolate suspected systems: Disconnect systems where the malicious extension was loaded if unauthorized access or persistence is suspected.
Preserve forensic evidence: Collect extension files, endpoint telemetry, SSH configuration, persistence artifacts, and relevant network logs before remediation.
Remove unauthorized SSH keys: Inspect and remove the malicious
svc-telemetrykey after preserving evidence.Investigate persistence mechanisms: Review and remove unauthorized LaunchAgents, cron entries, scheduled tasks, and Startup folder scripts.
Block identified infrastructure: Apply appropriate network controls for
134.209.82[.]225, particularly TCP ports22and8099, while considering any legitimate business dependencies.Rotate exposed credentials: Reset potentially compromised SSH credentials, API tokens, cloud secrets, and other credentials accessible to the affected user.
Review subsequent activity: Investigate SSH sessions, process execution, file access, and authentication events for signs of further compromise.
Rebuild where necessary: For confirmed compromise, consider rebuilding the endpoint from a trusted image rather than relying solely on removal of known artifacts.
Because the implant provides an interactive SSH access path, removal of the known files alone may not be sufficient to establish system integrity.
10. MITRE ATT&CK Mapping
The following mappings describe behaviors identified in the analyzed malicious extension.
| Tactic | Technique | ID | Observed behavior |
|---|---|---|---|
| Execution | User Execution: Malicious File | T1204.002 | Malicious extension code executes when the extension is loaded |
| Persistence | Account Manipulation: SSH Authorized Keys | T1098.004 | Adds an attacker-controlled SSH public key |
| Persistence | Scheduled Task/Job: Cron | T1053.003 | Uses Linux cron for startup persistence |
| Persistence | Scheduled Task/Job: Scheduled Task | T1053.005 | Attempts to create a Windows scheduled task |
| Persistence | Event Triggered Execution: Launch Agent | T1543.001 | Uses a macOS LaunchAgent |
| Discovery | System Information Discovery | T1082 | Collects operating-system and architecture information |
| Discovery | System Owner/User Discovery | T1033 | Collects the local username |
| Discovery | System Network Configuration Discovery | T1016 | Retrieves public IP information |
| Command and Control | Protocol Tunneling | T1572 | Establishes a reverse SSH tunnel |
| Command and Control | Encrypted Channel: SSH | T1573.002 | Uses SSH for remote communication |
| Exfiltration | Exfiltration Over C2 Channel | T1041 | Sends reconnaissance data through the external beacon endpoint |
11. Conclusion
The trojanized Claude Code extension demonstrates how compromised developer tooling can be abused to establish persistent remote access while maintaining the appearance of legitimate application functionality.
By injecting malicious JavaScript before the legitimate extension code, the attacker can execute reconnaissance, install unauthorized SSH access, enable remote connectivity, and maintain persistence across Windows, Linux, and macOS systems.
The incident is particularly relevant to organizations whose developers use AI-powered coding assistants and IDE extensions, as compromised development endpoints may expose source code, cloud credentials, API tokens, and CI/CD environments.
Organizations should urgently review Cursor Marketplace extension installations, investigate version 2.1.313, and conduct endpoint and network threat hunting using the identified indicators.
