If you installed Claude Code 2.1.312 or 2.1.313 in Cursor on 29 Oct, run Cursor's check script and rotate credentials

Fake Claude Code extension in Cursor's marketplace planted an SSH backdoor · Security incident · Cursor blog · cursor_ai · Oct 29, 2026

What happened

Cursor says a tampered copy of the Anthropic.claude-code extension, versions 2.1.312 and 2.1.313 for Windows and macOS, was served in its extension marketplace from about 2:27am to 1:35pm PT on 29 Oct. It was not built by Anthropic. The code reported host details, added an attacker SSH key to authorized_keys, tried to enable SSH and open a reverse tunnel, and installed persistence through a LaunchAgent or scheduled task. Cursor says enabling SSH usually failed without admin rights, but the key and persistence were still written, and uninstalling the extension may not remove them. Microsoft confirmed the Visual Studio Marketplace and npm releases were not affected.

How to prevent it

Turn off automatic extension updates in your editor and pin the versions you use, so a poisoned release can't land on its own. After any marketplace incident, check ~/.ssh/authorized_keys, LaunchAgents or scheduled tasks for entries you didn't add, and rotate keys from a clean machine.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

Before I install anything my AI suggests in Cursor, help me check it's safe. For the package, extension or MCP server [name]: 1) Check it's the official one (publisher, repo link, download count, how recently it was updated, typo-squatted names). 2) List what permissions or access it gets (files, network, env vars, email). 3) Tell me how to pin the version and review install scripts. 4) Check my project for packages with known security advisories, and tell me how to update them. Don't install or remove anything until I confirm.

Why this keeps happening: dependencies, plugins & mcp servers

AI tools suggest packages, editor extensions and MCP servers by name, and attackers publish look-alike or hijacked versions that steal keys or run code on install.

A quick checklist before you ship

More on this: every dependencies, plugins & mcp servers story and our related guide.

Tools involved

Cursor stories, Claude Code stories

Related stories

Source: original post on Cursor blog ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.