May 25, 2026BTA Team7 min read

TrapDoor: 34 Malicious Packages Are Stealing Wallet Keys and Cloud Credentials Across npm, PyPI, and Crates.io

On May 22, 2026 at 20:20 UTC, an attacker uploaded a PyPI package called eth-security-auditor@0.1.0. By the time researchers at Socket disclosed the campaign, it had grown into 34 malicious packages and more than 384 published versions spread across npm, PyPI, and Crates.io. Socket named it TrapDoor, and it was still active at the time of reporting (Socket, The Hacker News).

The packages masquerade as exactly what a security-minded developer would reach for: crypto auditors, DeFi risk scanners, wallet safety checkers, environment loaders, and build helpers. The lure is the disguise. Names like eth-security-auditor, defi-risk-scanner, cryptowallet-safety, web3-secrets-detector, and wallet-backup-verifier are designed to look like the tools you install to protect yourself.

What Happened in the Wild

TrapDoor splits across 21 packages on npm, 7 on PyPI, and 6 on Crates.io, and it adapts its execution trigger to each ecosystem. On npm the payload fires from a postinstall hook. On PyPI it executes at import time. On Crates.io it runs through build.rs during compilation. Three ecosystems, three native execution paths, one objective.

That objective is theft. The payload harvests cryptocurrency wallet keys, SSH keys, cloud credentials including AWS keys and GitHub tokens, browser-stored secrets, and any .env files it can reach, then exfiltrates them to attacker-controlled infrastructure (Socket, Cyber Security News). The campaign targets developers working in cryptocurrency, DeFi, Solana, Sui and Move, and AI tooling (The Block).

The detail that should make every defender sit up is the novel technique. TrapDoor poisons .cursorrules and CLAUDE.md files with Unicode-obfuscated hidden instructions. Those files are read by AI coding assistants as trusted project context. The buried instructions try to convince the assistant to perform credential discovery and exfiltration while presenting it to the developer as a routine security scan. The attacker is not just compromising the build. The attacker is trying to weaponize the developer's own AI tooling against them.

The Detection and Response Gap

This campaign exposes a blind spot that most blue teams have never instrumented. Package installation runs inside CI/CD and on developer laptops, two places where endpoint telemetry is often thin and where outbound network calls during a build look completely normal. A postinstall hook reaching out to the internet is indistinguishable from a thousand legitimate build steps unless you are watching for it.

Three gaps stand out:

How to Operationalize a Response

Treat this as an active incident if your developers touch any of the affected ecosystems. The remediation is concrete:

Mapped to MITRE ATT&CK, this behavior is well understood once you know where to look. The initial vector is Supply Chain Compromise (T1195.001), compromise of software dependencies and development tools. Execution rides on Command and Scripting Interpreter (T1059) through postinstall, import, and build.rs triggers. The objective is Credentials from Password Stores (T1555), Unsecured Credentials (T1552) targeting .env files and cloud keys, and Exfiltration Over Web Service (T1567). The AI context poisoning is best understood as Prompt Injection driving the assistant toward Automated Collection (T1119). Knowing the techniques lets you write detections instead of chasing indicators that rotate by the hour.

How BlueTeamAutomation Closes the Loop

Indicator lists go stale the moment a campaign mutates, and TrapDoor was still publishing new versions when it was disclosed. The durable defense is validating that your controls actually catch this class of behavior, then automating the response. That is the full blue-team workflow BlueTeamAutomation runs end to end.

TrapDoor is a reminder that the tools labeled security are now a delivery vehicle for the opposite. The packages with the most reassuring names were the payload. Blue teams that wait for a CVE will miss this entirely. The ones that validate their detections against real supply-chain behavior and automate the response are the ones who close the window before credentials walk out the door.

Validate your defenses against supply-chain attacks

BlueTeamAutomation runs continuous BAS, EDR, SIEM correlation, and SOAR response so install-time credential theft gets caught and contained automatically.

Talk to BlueTeamAutomation →