Hackers Hijack Claude Code Extension on Cursor Marketplace to Install SSH Backdoor

Hackers Hijack Claude Code Extension on Cursor Marketplace to Install SSH Backdoor

Cursor disclosed on October 29 that a malicious update to Anthropic's Claude Code extension had been distributed through its VS Code extension marketplace, potentially affecting up to 5,000 users. The compromised package, identified as version 2.1.313, contained code designed to establish persistent SSH access to developers' computers and collect system information. Cursor confirmed that Anthropic did not create the modified version.

The unauthorized update was available for approximately 11 hours, from 2:27 a.m. to 1:35 p.m. Pacific Time on October 29. It appeared under the legitimate Claude Code extension identity, meaning developers installing or updating the extension through Cursor's marketplace could have received the malicious package.

Security researchers found that attackers had inserted a 66-line loader into the extension's JavaScript code. The added instructions attempted to configure remote access, establish persistence, and transmit information about affected systems.

The malware first gathered identifying details about the computer and its user, including the operating system, username, public IP address, working directories, and configured Git email. It also collected environment variable names that could reveal which development tools, cloud services, or credential types were configured.

Researchers noted that the initial data transmission did not directly include environment variable values. However, successful remote access could have allowed attackers to inspect additional information on a compromised machine.

The more serious component involved an attempted SSH backdoor. The extension tried to insert an attacker-controlled public key into the system's authorized SSH keys, activate the local SSH service, and establish a reverse connection to an external server.

To maintain that connection, the malware also installed background mechanisms designed to restart the tunnel approximately every 60 seconds. On macOS, it used a LaunchAgent, while the Windows implementation relied on a scheduled task with a Startup-folder fallback. Researchers also identified Linux-specific persistence behavior.

Cursor's investigation found that the attack's remote-access component would generally fail because of programming errors and insufficient system permissions.

“Outside of highly unusual circumstances where Cursor was started with administrator privileges, due to errors in the malicious code, this step would fail,” the company explained in its security notice.

Enabling SSH typically requires elevated permissions on macOS and Windows, which the extension would not ordinarily possess. As a result, the attacker would generally have been unable to establish the intended remote connection.

That limitation did not eliminate the security risk. The malicious extension could still install an unauthorized SSH key, create persistence mechanisms, and collect system details, leaving affected machines requiring inspection and cleanup.

The attack was also notable because it involved a modified version of a legitimate extension rather than a separately published imitation.

Researchers at OpenSourceMalware confirmed that the package retained Anthropic's official extension identifier while incorporating malicious code into its main JavaScript bundle. This allowed the compromised update to appear as part of the normal extension distribution process.

The incident was limited to Cursor's marketplace, according to the available investigation. There is no evidence that Anthropic's official distribution, Microsoft's VS Code Marketplace, or Open VSX distributed the malicious version.

Anthropic has since published version 2.1.314 through Microsoft and Open VSX.

After discovering the incident, Cursor removed the compromised extension and temporarily disabled its entire extension marketplace while investigating the breach.

The company audited marketplace access, determined that no additional extensions had been modified, rotated its security keys, and rebuilt the marketplace before restoring service.

Cursor also coordinated with the hosting provider responsible for the attacker's infrastructure to disable the server receiving system information and supporting the attempted SSH connections.

The company says the malicious server is no longer operational, preventing the original payload from communicating with that destination.

However, Cursor has not disclosed how the attackers managed to introduce the unauthorized update into its marketplace. The precise method used to compromise the distribution process remains unknown.

Cursor is contacting potentially affected users directly and has published remediation instructions for developers who installed or updated the extension during the identified period.

The company warns that simply uninstalling version 2.1.313 may not remove the malicious components. Because the extension created separate background scripts, those files could remain after the original package is deleted.

Affected users are advised to inspect their systems for the unauthorized SSH key, identify persistence mechanisms, and remove any related processes. Cursor has provided cleanup scripts for macOS and Windows, along with technical indicators that security teams can use to investigate affected endpoints.

The company also recommends isolating machines showing evidence of malicious code execution, evaluating whether a complete system rebuild is necessary, and rotating credentials or active sessions accessible from affected computers.

Although Cursor's findings suggest the attempted remote-access mechanism would fail under most normal configurations, the incident illustrates how a compromised extension update can introduce security risks into development environments.

The investigation has established the affected package, distribution window, and intended malicious behavior, but the method used to publish the unauthorized update remains unresolved. Cursor says no other marketplace extensions were compromised and that the attacker's infrastructure has been taken offline.

This analysis is based on reporting from Cursor & The Hacker News.

Image courtesy of The Hacker News.

This article was generated with AI assistance and reviewed for accuracy and quality.

Updated Oct 30, 2026

About this article: This article was generated with AI assistance and reviewed by our editorial team to ensure it follows our editorial standards for accuracy and independence. We maintain strict fact-checking protocols and cite all sources.

Word count: 852Reading time: 0 minutes

📧 Stay Updated

Get the latest AI news delivered to your inbox every morning.

AI News Daily

Breaking Intelligence • Since 2023

Join hundreds of thousands of AI professionals who start their day with our curated newsletter. Get breaking news, expert analysis, and exclusive insights.

Stay Ahead of AI

Get the latest AI breakthroughs, tools, and insights delivered to your inbox every week.

✓ Free forever✓ Unsubscribe anytime✓ No spam guarantee

Go Premium

Unlock unlimited AI tools and an ad-free reading experience designed for AI professionals.

• Ad-free experience• Premium AI tools
Start Free Trial

14-day free trial • Cancel anytime
Plus $9/mo • Pro $90/yr (2 months free)

Follow Our Community

ChatAI

Breaking Intelligence

Your daily briefing on what matters in AI. Trusted by developers, researchers, executives, and AI enthusiasts worldwide.

© 2026 ChatAI. All rights reserved.