Claude Code malware reached up to 5,000 developers after attackers distributed a modified extension through Cursor’s marketplace on October 29. The malicious package attempted to install persistent SSH backdoors and collected information about affected computers.

The compromised release, version 2.1.313, remained available from approximately 2:27 a.m. to 1:35 p.m. Pacific Time. However, the potential exposure figure does not establish how many machines attackers successfully accessed.

Claude Code Malware Executed When the Extension Loaded

Cursor supports VS Code extensions, including Anthropic’s Claude Code assistant for writing and debugging software. According to Cursor, Anthropic did not develop the malicious package. Nevertheless, investigators have not explained how attackers distributed it under Anthropic’s name.

Researchers found a malicious JavaScript loader at the beginning of the extension’s main file. The attackers otherwise preserved the legitimate code. Consequently, the malware executed when the extension loaded, without requiring developers to interact with the assistant.

The payload collected system and user information, added an attacker-controlled SSH key and attempted to establish a reverse tunnel. It also installed persistence through a macOS LaunchAgent or Windows scheduled task or startup script. These mechanisms retried the connection roughly every minute.

Coding Errors Limited Remote Access Attempts

Despite those capabilities, researchers identified mistakes that likely prevented remote access on many Windows and macOS machines. The errors affected attempts to enable SSH where it was not already running. As a result, a reverse tunnel could exist without providing access to the computer.

On macOS, the malware checked Remote Login status without administrator privileges. The command therefore returned a permissions error instead of the expected service status. Because the script looked specifically for an “Off” response, it skipped the activation step.

Meanwhile, the Windows routine attempted to configure OpenSSH through PowerShell using a Unix shell unavailable on standard Windows installations. That caused the setup to fail. However, systems already running an SSH server could still provide the access the attackers sought.

Reconnaissance Continued Even When SSH Setup Failed

The Claude Code malware could still install keys and persistence mechanisms despite unsuccessful SSH activation. Additionally, it transmitted reconnaissance information to an attacker-controlled server. That information included usernames, hostnames, public IP addresses and Git email addresses.

The script also reported the names of environment variables associated with sensitive credentials. However, researchers found that it did not directly steal credential values. They suggested the attackers intended to retrieve sensitive information manually after establishing remote access.

Cursor Removed the Package and Audited Its Marketplace

Cursor removed the extension and temporarily closed its entire marketplace. The company then audited other extensions and rotated access keys before reopening the service. It also worked with the hosting provider to take the attacker’s server offline.

According to Cursor, its investigation found no evidence of compromise in other extension versions or the official distribution. Initial reports also raised concerns about npm, Open VSX and Microsoft’s marketplace. However, subsequent findings identified Cursor as the only distribution source.

Developers who downloaded the package during the exposure window should check for an SSH key labelled svc-telemetry. Cursor also published remediation instructions for affected users. Recommended recovery measures include isolating compromised machines, rotating accessible secrets, invalidating sessions and rebuilding from safe backups.

Questions remain about how attackers published the package and whether they compromised Cursor or Anthropic systems. Neither the distribution method nor the full extent of successful access was clear at publication.


0 responses to “Claude Code Malware Planted SSH Backdoors Through Cursor”