TLDR
TrapDoor is an active malware campaign that hides in fake developer tools to steal wallet keys and credentials from crypto and AI developers.
- TrapDoor spreads via poisoned npm, PyPI, and Rust packages that exfiltrate wallet files, SSH keys, cloud tokens, and GitHub credentials from developer machines.
- The malware specifically targets major crypto wallets and exchanges, and even hijacks AI coding assistants like Claude and Cursor to trick them into leaking secrets.
- Developers should treat dependencies and AI tooling as high-risk surfaces, audit environments, rotate credentials if exposed, and tighten package and wallet hygiene.
Deep Dive
1. How TrapDoor Steals Keys
Security firm Socket and others report that TrapDoor is a supply chain attack, embedding info-stealing malware inside seemingly legitimate packages on npm, PyPI, and Crates.io, with at least 34 packages and 384 versions identified so far. These packages run on install or import and scan infected machines for wallet keystores, SSH keys, AWS credentials, browser-stored logins, and GitHub tokens, then send them to attacker servers. The campaign targets developers building on Solana, Sui, Aptos and other ecosystems, using names like security auditors or Sui/Move build helpers to blend in with real tooling.
Simply installing or importing a library in your dev environment can be enough to leak all your keys if that library is compromised.
2. Why This Is So Dangerous For Crypto
TrapDoor goes after high-value developer environments, not just end user wallets. With stolen keys and tokens, attackers can access project repositories, cloud infra and production wallets, potentially pushing malicious code or draining treasuries, as detailed in multiple Socket summaries. The malware also injects hidden prompts into AI coding assistant config files (such as CLAUDE.md or Cursor rules) so that security scans triggered by the AI can quietly search for and exfiltrate secrets, according to a Cointelegraph analysis.
3. Practical Defenses And Red Flags
Key protective steps for teams include:
- Tighten dependency hygiene: pin exact versions, favor well-vetted packages, and scrutinize new security or helper libraries, especially those touching wallets or infra.
- Harden secrets: keep long term funds in hardware wallets, minimize hot wallet balances on dev machines, and use separate keys and roles for development, staging, and production.
- If you suspect exposure, isolate the machine, rotate all relevant keys and tokens, and rebuild from a clean image rather than trusting an in-place cleanup.
Treat developer laptops and AI assistants as part of your attack surface, and assume any secrets present there could be copied if a poisoned package slips in.
Conclusion
TrapDoor shows that attackers increasingly target the software supply chain and developer tooling rather than just on-chain contracts or retail wallets. For crypto teams, the real risk is not only one wallet being drained but the compromise of entire codebases and infrastructures via stolen keys. Strengthening dependency practices, secret management, and AI assistant configurations now can prevent a single malicious package from escalating into a project-level incident.
