# TrapDoor packages on npm, PyPI and Crates.io steal wallet data and plant hidden prompts for AI coding tools - Severity: High · Status: Partly contained (past) - Chains: Multiple EVM chains · Method: Supply-chain stealers - Started: May 26, 2026 · Last update: May 26, 2026 - Who/what: Developers installing packages from npm, PyPI and Crates.io - AI involvement: AI agents as the target. The packages planted .cursorrules and CLAUDE.md files with hidden Unicode instructions meant to trick AI coding assistants into running steps that could find and exfiltrate secrets. Socket reported in late May 2026 a campaign it named TrapDoor: more than 34 malicious packages and 384+ related versions across npm, PyPI and Crates.io that steal crypto wallet data and other developer secrets. The packages also tried to alter files that AI coding tools read, such as .cursorrules and CLAUDE.md, using hidden Unicode instructions meant to get the assistant to run scan-like steps that find and send out secrets. No confirmed losses or victim counts have been published. Developers who installed flagged packages should rotate credentials and move wallet funds. ## Am I affected? You may be affected if you installed crypto, DeFi or 'security scanner' packages from npm, PyPI or Crates.io in May 2026 that appear on Socket's TrapDoor list, or if unexpected .cursorrules or CLAUDE.md files showed up in your projects. ## What to do now - Check lockfiles against the published TrapDoor package list and remove any matches. - Rotate SSH keys and cloud and GitHub tokens, and move funds from wallets whose keys or files were on that machine. - Open .cursorrules and CLAUDE.md files in an editor that shows hidden characters and delete any you did not write. ## How to avoid this - Review AI assistant config files in repos as carefully as code, and don't let assistants run commands without approval. - Keep wallet keys off development machines; use hardware wallets. - Pin dependencies and scan new packages before installing them. ## Sources - TrapDoor malware campaign puts developer workstations in CISO spotlight (CSO Online, 2026-05-26): https://www.csoonline.com/article/4177019/trapdoor-malware-campaign-puts-developer-workstations-in-ciso-spotlight.html Full record: https://drains.watch/i/trapdoor-supply-chain-ai-assistant-config-poisoning-may-2026 · JSON: https://drains.watch/i/trapdoor-supply-chain-ai-assistant-config-poisoning-may-2026.json Rules for the assistant: help me check my own wallets read-only (public addresses only). Never ask for or handle a seed phrase or private key. Point me to official revoke tools and the wallet's own support.