
Claude Code Extension Backdoor: Why Uninstalling Isn't Enough
Claude Code Extension Backdoor: Why Uninstalling Isn't Enough
On October 29, Cursor's extension marketplace inadvertently served a backdoored version of the Claude Code extension for about 11 hours. The affected versions, 2.1.312 and 2.1.313, were available on Windows and macOS from approximately 2:27am to 1:35pm PT. Notably, these versions were not built by Anthropic.
If you're a Cursor user, it's essential to take immediate action. The backdoor in the Claude Code extension creates persistence that remains even after the extension is removed or updated. Simply uninstalling or updating the extension will not eliminate this issue.
Checking Your Machine
To ensure your machine is secure, refer to Cursor's security notice, last updated on October 30 at 11:30am PT. This notice provides a comprehensive guide on what to check and how to proceed.
Next Steps
Follow the instructions in the security notice to verify your system's security and take necessary steps to clean up any potential issues. Remember, uninstalling the extension is not enough to remove the backdoor. Take action now to protect your machine.
Technical Breakdown: What the Claude Code Extension Backdoor Did
The Claude Code Extension was compromised by a malicious loader that was inserted in front of the real extension code, allowing attackers to gain unauthorized access to user machines. The exact method of how this malware was introduced is still unknown.
According to Cursor's official notice, the malicious payload performed the following four key actions:
- Sent sensitive machine data to the attacker, including hostname, username, OS, architecture, home directory, environment variable names, working directories, Git email, and public IP.
- Added a malicious SSH key by appending the
svc-telemetrySSH key to the user'sauthorized_keysfile. - Attempted to establish a reverse SSH tunnel, retrying approximately every 60 seconds, although this would require admin rights and is reported to fail on most hosts.
- Set up persistence mechanisms, including a LaunchAgent on macOS and a scheduled task on Windows, to maintain access even after the extension is uninstalled.
The persistence aspect is particularly concerning, as these scripts continue to run outside of the extension folder even after uninstallation. Although the attacker's server is currently offline, courtesy of Cursor's efforts to have it taken down, any existing backdoors on user machines remain a potential security risk.
Indicators of Compromise to Check
Checking for Claude Code Extension Backdoor
To determine if you've been affected, start by checking your SSH key. This is the fastest way to verify:
grep svc-telemetry ~/.ssh/authorized_keys
On Windows, you'll need to check two locations: %USERPROFILE%\.ssh\authorized_keys and C:\ProgramData\ssh\administrators_authorized_keys. If you find any matches, it indicates you've been affected.
Affected Files and Services
macOS
Look for the following files and services:
~/Library/LaunchAgents/com.apple.sysmond.plist(labelcom.apple.sysmond)~/.config/.smtand~/.config/.smtk$TMPDIR/.stk_followed by 10 hex characters
Windows
Check for these files and services:
- A scheduled task named
SysMon %USERPROFILE%\.config\smt.cmdand%USERPROFILE%\.config\smtk%TEMP%\.stk_followed by 10 hex characters- A fallback
sysmon.cmdin your Startup folder
Network Connections
Be aware of connections to 134.209.82.225, including:
- SSH on port 22
- A POST to
/beaconon port 8099
Note that lookups to ifconfig.me or api.ipify.org alone do not confirm an issue.
Suspicious Processes
Monitor for these processes:
ssh -N -Rorautossh -M 0running in the backgroundsystemsetup -setremotelogin onin process or command-line logs on macOS- An OpenSSH Server capability you never installed on Windows
Takeaway: Checking these indicators will help you determine if your system has been affected by the Claude Code Extension Backdoor.
Identifying Claude Code Extension Backdoor Indicators
Security teams can use the SHA-256 hashes provided in Cursor's notice to identify the payload and tampered VSIX files.
Detection on Mac
To sweep the main file and process indicators on a Mac, use this one-liner:
grep -s svc-telemetry ~/.ssh/authorized_keys; ls -la ~/Library/LaunchAgents/com.apple.sysmond.plist ~/.config/.smt ~/.config/.smtk 2>/dev/null; find "$TMPDIR" -maxdepth 1 -name '.stk_*' 2>/dev/null; pgrep -fl 'ssh -N -R|autossh'
A clean system will return empty output.
Naming Pattern Analysis
Note the naming pattern used by the backdoor: svc-telemetry, com.apple.sysmond, and SysMon are disguised as system monitoring tools. Be cautious of files with com.apple.* names in the ~/Library/LaunchAgents folder, as Apple's own launch agents typically reside in /System/Library. This habit can help detect similar threats in the future.
The Version Number Trap
The version number 2.1.312 is a legitimate Claude Code release in Anthropic's changelog, but it was also reused by the attacker.
This means asking do I have 2.1.312? is not enough, as a clean install from Anthropic's official channels will have the same version number. The same applies to Claude Code 2.1.313. What matters is the source of the installation, specifically if it was from Cursor's marketplace on macOS or Windows during a certain time frame.
This has two important implications: users who installed 2.1.312 from elsewhere should not panic, and those with a matching version number should not assume they are safe. Version numbers do not guarantee the package contents are genuine.
Cleaning Up: A Step-by-Step Guide
To fully remove the Claude Code Extension backdoor, follow these essential steps in order. Cursor has published two remediation scripts, available in its security notice.
- Detect the issue using the provided grep command to check for the key.
- Isolate the affected machine immediately if you find anything, and consider a full rebuild.
- Run the remediation script:
- On macOS, execute
bash remediate-macos.shas the affected user, not as root. - On Windows, open an admin PowerShell and run
powershell -ExecutionPolicy Bypass -File .\remediate-windows.ps1.
- Rotate sensitive credentials from a trusted machine, including Git tokens, cloud keys, and API keys.
- Update the extension only after completing the above steps. Check Anthropic's changelog for the latest clean version, such as 2.1.314.
Remember, credential rotation is a critical step that should not be skipped. Although the payload only sent environment variable names, an attacker with SSH access could still read the values directly. If you've found evidence of the backdoor, assume the machine has been compromised. For further assistance or questions, contact security@cursor.com.
Real-World Impact: Who's Affected and Who Isn't
The Hacker News reports that Cursor confirmed on X that the incident affected at most 5,000 users, although this number is not included in the official notice. Cursor found no evidence that other versions of the extension or the official distribution were affected. It took immediate action, shutting down the marketplace, conducting an audit, and finding no other tampered extensions. As a precaution, Cursor rotated keys and rebuilt the marketplace. The Hacker News also corrected earlier reports, stating that Open VSX was not affected.
In simple terms: the tampered builds originated from Cursor's marketplace, specifically on macOS and Windows, during a specific time frame. If you obtained Claude Code from Anthropic's official distribution, Cursor found no evidence of compromise, but running a quick five-second check is a precautionary measure that comes at no cost.
Key Limitations of the Current Response
Lack of Root Cause Explanation: Cursor has not provided an explanation for how a tampered build was uploaded to its marketplace. This omission makes it difficult to determine whether the vulnerability has been fully addressed or if it was just a one-time attack.
Extended Exposure Window: With coding extensions running on full user permissions, an 11-hour window of serving a bad build is a significant concern. This highlights the risk of a single point of failure in the extension marketplace, putting every developer at risk.
User-Driven Remediation: While Cursor has removed the bad versions from its marketplace, it has not outlined an automatic process for cleaning up installed copies. As a result, users who installed the affected version during the exposure window and did not see the notice may still have the LaunchAgent or scheduled task active on their systems.
Verdict: Your Developer Action Plan
To protect yourself from the Claude Code Extension backdoor, take immediate action. Run the grep command today, it only takes five seconds.
Immediate Action
If the grep command yields a positive result, isolate the affected machine to prevent further damage. Then, run Cursor's cleanup script and rotate your credentials from a clean machine. Only after completing these steps should you update your system, as updating first can leave the backdoor in place.
Long-Term Protection
For long-term security, treat AI coding extensions like any other dependency with shell access. This is because they can access your repository, environment, and keys. Check your editor's extension auto-update setting and pin versions on machines that hold production credentials. Regularly monitor your authorized_keys file, as it is often overlooked but frequently targeted by attackers.
Tools in this post
Written by
Co-founder of Tool Directory AI. Tests and reviews the AI tools listed here.