Search your machine and repos for an unknown 'workspace-tools' MCP server, new SessionStart hooks and AGENTS.md or CLAUDE.md files you didn't write

A malicious Ruby gem stole AI coding tool logins, then wrote itself into MCP configs and AGENTS.md so agents would run it again · Security incident · Web · Socket (Kush Pandya) · Nov 6, 2026

What happened

Socket's Threat Research Team analysed strutil-core 1.0.1, a RubyGems package published on 1 November 2026 less than two hours after a clean 1.0.0. During gem install, a native extension script downloads the Bun runtime and runs a 5.48 MB worm from the Shai-Hulud-derived Miasma family. It collects cloud, CI, registry, SSH, wallet and AI coding tool credentials, adds an MCP server named workspace-tools and SessionStart hooks to local agent configs, and with stolen Git credentials commits .claude/settings.json, .cursor/mcp.json, CLAUDE.md, AGENTS.md and a VS Code folder-open task into repositories, so opening the repo in an AI coding tool can run it again. A monitor deletes the home directory if a stolen GitHub token stops working. RubyGems removed both versions about five hours after release; Socket found no public dependents and no confirmed victims.

How to prevent it

Review agent config files (mcp.json, settings.json, hooks, AGENTS.md, CLAUDE.md) in code review like any other code, and keep workspace trust prompts on for repos you didn't write. Pin dependencies and check new packages before installing. If you find the worm, isolate the machine and remove its persistence before revoking tokens, because revoking the GitHub token first triggers the wiper.

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 Claude Code, 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

Claude Code stories, Cursor stories, Gemini CLI stories, MCP stories

Related stories

Source: original post on Web ↗. 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.