Editor extension supply chain
An editor extension is not a theme or a settings file. In VS Code and its forks, such as Cursor, an extension runs in the extension host with the same permissions as the editor. It can read and write your files, make network requests, start processes, and change workspace settings. An extension update is effectively new code running on your machine, and it can reach your source code, SSH keys, cloud credentials, and agent tokens. This page uses a real October 2026 incident to show where the trust boundaries are, then turns it into settings and a checklist. For install-time scripts in JavaScript dependencies, see npm supply chain. The trust model is the same; the delivery channel is different.Case study: a tampered Claude Code extension on Cursor’s marketplace
The facts in this section were current as of October 31, 2026. Check the vendor notices under References at the end of this page for later updates.
Anthropic.claude-code versions 2.1.312 and 2.1.313 for macOS and Windows. Anthropic did not build them. Microsoft and Anthropic said the Visual Studio Marketplace, Open VSX, and the npm package were not affected, and Cursor said it had no evidence that the official distribution was affected. Reports estimated up to about 5,000 affected users. Anthropic published its next legitimate release as 2.1.314 so the versions would not be confused.
What the payload did. Code prepended to extension.js ran as soon as the extension host loaded the module, before the extension’s normal activate function. The user did not have to do anything. The payload:
- Collected the hostname, username, OS, home and working directories, global Git email, public IP, and up to 40 environment variable names (not values) matching
KEY|TOKEN|SECRET|PASS|AWS|GCP. - Appended an attacker SSH public key to
~/.ssh/authorized_keys, then tried to enable the local SSH server. - Opened an outbound reverse tunnel (
ssh -N -R '*:0:localhost:22') so the attacker could reach the machine’s port 22 without any inbound port being open. - Installed persistence outside the extension directory: a macOS LaunchAgent named
com.apple.sysmond, a Linux@rebootcron entry, or a Windows scheduled task namedSysMonwith a Startup-folder fallback. - Sent the collected details to the attacker’s server.
Durable lessons
An extension update runs code on your machine
Neither the marketplace nor the editor’s permission model limits what an extension can do once it is installed. VS Code’sextensions.allowed setting controls which extensions can be installed and enabled. Microsoft’s documentation states that it does not limit an extension’s runtime permissions. Plan as if every enabled extension can do anything your user account can do.
A publisher label is not provenance
The tampered build appeared under a well-known publisher name, and many people assumed that meant Anthropic had signed it. A mirror or proxy marketplace is its own link in the trust chain. Cursor uses Open VSX behind its own proxy (marketplace.cursorapi.com) and notes that the same publisher.extension ID can point to a different publisher or different code on Open VSX than on the Microsoft Marketplace. Treat extension IDs the way you treat package names: confirm which registry your editor actually downloads from.
Auto-update is the delivery path; a cooldown blunts it
The malicious versions were available for about 11 hours. Many affected machines received them through automatic updates, not deliberate installs. An install or update cooldown longer than the takedown window would probably have kept them out. A cooldown cannot stop a malicious release that stays up longer than the delay, but it removes the cheapest attack: a short-lived malicious upload.Uninstalling is not cleaning up
The payload wrote keys, scripts, and startup entries outside the extension folder. Removing or updating the extension does not undo them. Taking the attacker’s server offline does not remove them from your machine either.Reverse tunnels avoid inbound checks
The machine connects out to the attacker. A firewall audit that only looks for open inbound ports will not find this. Successful logins through the tunnel show up in SSH logs as coming fromlocalhost.
Environment variable names are a target map
Collecting only variable names still tells an attacker which machines hold AWS, GCP, or API tokens and are worth a closer look. Keep long-lived secrets out of your global shell environment.The same model applies to agent plugins
Claude Code’s documentation says the same about its plugins: hooks, monitors, MCP servers, and LSP servers run with your full user permissions and outside the sandbox. Auto-update can change the files you reviewed. The marketplace name tells you who publishes the catalog, not what each plugin does. Use the same rules for agent skills, plugins, and MCP servers.Harden a personal setup
- Keep the extension list short. Remove extensions you do not use every week. Each enabled extension is a separate update channel into your machine.
-
Delay automatic updates. In VS Code,
extensions.autoUpdateDelaysets how many hours to wait after a version is published before installing it automatically. It only applies when auto-update is on. VS Code’s documentation lists a 12-hour default as of October 2026, but check your version. Pick a longer delay for extensions with broad access:In Cursor, setextensions.installCooldownHoursin user settings when your team has not enforced a cooldown:Clicking Update yourself skips the VS Code delay. Only do this when you have a reason. -
Pin high-risk extensions manually. Right-click an extension and turn off Auto Update. Update it on purpose after the release has been out for a while. Extensions installed from a
.vsixfile have auto-update off by default. - Install from the publisher’s primary registry. Check the publisher ID and verification badge, and use the publisher’s own install link when one exists.
- Do not run the editor as administrator or root. In this incident, the lack of admin rights was one reason the SSH server usually failed to start.
- Keep secrets out of global environment variables. Prefer credential helpers, OS keychains, and short-lived tokens scoped to a project.
- Isolate agents and unfamiliar repositories. Use a VM or dev container for agent runs and untrusted code. A container is only a boundary if it does not mount your home directory or the Docker socket.
Harden a team setup
-
Allowlist extensions. In VS Code, use
extensions.allowed(1.96+) or theAllowedExtensionspolicy to allow by publisher, extension ID, exact version, or platform."stable"blocks pre-release versions. Once you add allow rules, extensions that do not match any of them are blocked.For local.vsixfiles, these rules check identifiers declared inside the package. They do not verify where the package came from. -
Manage update timing centrally. VS Code exposes
extensions.autoUpdateandextensions.autoUpdateDelayas enterprise policies. In Cursor, team admins can set Marketplace Install Cooldown (hours) under Team settings → Security & automation. It defaults to0(disabled) and, when set, overrides each user’sextensions.installCooldownHours. - Require signatures where the editor supports it. Cursor Enterprise can require valid Open VSX signatures (Require Extension Signature Verification). The Visual Studio Marketplace signs every extension, and VS Code checks the signature at install time.
- Host a private marketplace when you need an approved, rehosted set of extensions, including for air-gapped networks.
-
Alert on behavior, not just hashes. Useful signals from this incident:
- an editor helper process (
Code Helper,Cursor Helper, and similar) writing~/.ssh/authorized_keys - a non-Apple process creating a
com.apple.*LaunchAgent, or a LaunchAgent that runs/bin/shon a hidden script sshorautosshstarted with-Rfrom a user session- local SSH logins from
127.0.0.1or::1
- an editor helper process (
When an extension you use is reported malicious
-
Confirm channel, version, and platform. Find out which marketplace delivered your copy. Check the installed versions:
- Check the vendor’s indicators before deleting anything. Preserve evidence, and isolate the machine if you find signs that the payload ran.
-
Look outside the extension folder for SSH keys, startup entries, and running processes:
On Windows, check
%USERPROFILE%\.ssh\authorized_keys,C:\ProgramData\ssh\administrators_authorized_keys, scheduled tasks, and the Startup folder. - Remove persistence, unauthorized keys, and tunnel processes. Then decide whether to rebuild the machine. Review vendor remediation scripts before you run them.
- Rotate credentials and revoke sessions from a different, trusted device. Do this for anything the affected user account could reach.
- Do not treat an extension update or a server takedown as cleanup. Confirm that the artifacts do not return after you log in again or restart.
References
- Folo source: 2026-10-31 Hacker News Top Stories (SuperTechFans)
- Folo source: Solidot, Claude Code for VS Code extension backdoor
- Cursor: Security notice for Anthropic.claude-code 2.1.312 and 2.1.313
- Phorion: Official Claude Code extension compromise advisory
- Microsoft Security: Inside a malicious Claude Code-branded extension
- Socket: Registry records for Claude Code 2.1.313
- Hacker News: Anthropic clarification on affected channels
- VS Code docs: Extension runtime security
- VS Code docs: Extension auto-update
- VS Code docs: Manage extensions in enterprise environments
- microsoft/vscode #321039: configurable
extensions.autoUpdateDelay - Cursor docs: Extensions, install cooldown, and signature verification
- Claude Code docs: Plugin security and trust
