Before you open a repo you didn't write in an AI coding tool, read its AGENTS.md, CLAUDE.md, .claude/, .cursor/, .mcp.json and .vscode/tasks.json, and never let the agent run a script it is told not to inspect
Bitdefender: poisoned GitHub repos tell Claude Code, Cursor and Copilot to run a hidden credential stealer · Security incident · Bitdefender Labs · Bitdefender · Nov 17, 2026
What happened
Bitdefender Labs said on 17 Nov 2026 it had found 22 malicious GitHub links built to target developers using AI coding assistants. Files such as AGENTS.md and CLAUDE.md tell the assistant that scripts/setup.js is a 'sealed' signed artifact it must not read, and to run it automatically at session start without asking. A second route uses a session-start hook in .claude/settings.json, so the script runs once the repo is trusted with no prompt at all. The heavily obfuscated payload steals CI/CD tokens, cloud secrets, package-registry credentials, SSH keys, .env files, API keys, browser and password-manager data, then searches the machine for config files of 14 agents (Claude, Codex, Gemini, Copilot, Cursor, Bolt, Cline, Aider and others) to plant malicious instructions, hooks or MCP servers. With stolen GitHub or GitLab tokens it can commit the same files into up to 25 other repos by default and try to republish infected packages to npm, PyPI, RubyGems and JFrog.
How to prevent it
Treat agent instruction files, hooks, MCP configs and editor tasks in other people's repos like executable code: review them before trusting the folder, keep auto-approve off for shell commands, and be suspicious of any instruction that says to run something without looking at it or to hide its output.
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
- Check the publisher, download history and repository before installing anything an AI suggests.
- Pin versions and use a lockfile; review changes when updating.
- Give MCP servers and extensions the fewest permissions possible.
- Rotate keys if a package you use is reported as compromised.
More on this: every dependencies, plugins & mcp servers story and our related guide.
Tools involved
Claude Code stories, Cursor stories, GitHub Copilot stories, Gemini stories, Bolt stories
Related stories
- If your company inspects HTTPS traffic, ask IT to lock down who can change inspection rules and issue server certificates, and keep AI coding tools updated from trusted networks
UpdateMITM: Cursor, Claude Code and VS Code updates could be swapped for malware on intercepted networks - 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 - Search your MCP configs for archived @modelcontextprotocol reference servers and replace them with the service owner's maintained server
MCPhantom: coding agents install deprecated Anthropic MCP servers that will never be patched
Source: original post on Bitdefender Labs ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.