2 Sources
[1]
TrapDoor Supply Chain Attack Spreads Credential-Stealing Malware via npm, PyPI, and CratesIO
A new coordinated cross-ecosystem software supply chain attack campaign has targeted npm, PyPI, and Crates.io to distribute credential-stealing malware. The campaign, codenamed TrapDoor, spans more than 34 malicious packages across over 384 versions. The earliest activity was recorded on May 22,
[2]
TrapDoor Malware Targets Crypto Developer Tools
Socket says a campaign of malicious packages is aiming to steal crypto and is injecting hidden instructions that hijack popular AI coding assistants. An active supply chain attack is targeting crypto and artificial intelligence developers in a bid to steal crypto, data or credentials, says the
Share
Copy Link
A sophisticated supply chain attack called TrapDoor has infiltrated npm, PyPI, and Crates.io with over 34 malicious packages designed to steal crypto wallets, SSH keys, and cloud credentials from developers. The campaign uses a novel technique to hijack AI coding assistants like Claude and Cursor, tricking them into executing hidden instructions that exfiltrate sensitive data.
A coordinated supply chain attack campaign dubbed TrapDoor malware has emerged across multiple developer ecosystems, distributing credential-stealing malware through malicious packages on npm, PyPI, and Crates.io
1
. Developer platform Socket detected the campaign on Friday, revealing that it spans more than 34 malicious packages across over 384 versions, with the earliest activity recorded on May 22, 2026, at 8:20 p.m. UTC1
. The operation specifically targets crypto and AI developers working in crypto, DeFi, Solana, and AI communities, with attackers repeatedly pushing new releases across ecosystems in waves from a cluster of accounts in quick succession1
2
.
Source: Hacker News
The malicious packages are engineered to extract developer secrets, crypto wallet information, SSH keys, cloud credentials, browser data, and environment variables from infected systems
1
. Socket chief technology officer Ahmad Nassri confirmed that the malware targets popular crypto wallets, including Coinbase, Binance, Solana, Sui, Aptos, and MetaMask, in addition to the Brave internet browser2
. Several npm packages deploy a shared payload called trap-core.js that scans for credentials, validates AWS and GitHub tokens, attempts SSH-based lateral movement, and plants persistence through .cursorrules, CLAUDE.md, Git hooks, shell hooks, systemd, cron, and SSH1
. The operation is notable for its diverse delivery paths, using postinstall hooks, remote JavaScript payloads executed during package imports, and malicious build.rs scripts to target Sui and Move developers1
.An unusual aspect of the campaign involves implanting .cursorrules and CLAUDE.md files containing hidden instructions designed to trick AI coding assistants like Claude and Cursor into running a "security scan" that results in secret discovery and exfiltration
1
2
. The threat actor has been opening GitHub pull requests across popular AI and developer projects, including browser-use/browser-use, langchain-ai/langchain, and langflow-ai/langflow, testing whether AI-related project files can be introduced through regular open-source contribution workflows1
. This approach extends the attack beyond pushing malicious packages to open-source ecosystems, potentially causing AI coding tools to parse those hidden instructions and apply them automatically.Related Stories
The campaign demonstrates technical sophistication through ecosystem-specific execution paths tailored to each platform. The npm packages run a JavaScript payload that scans for credentials, validates stolen credentials using AWS and GitHub API calls, and creates persistence on the host using cron jobs, systemd services, Git hooks, and moves across the network via SSH
1
. The Rust crates search for local keystores, encrypt the data using a hardcoded XOR key, and exfiltrate it to GitHub Gists, using a build script to trigger malicious code execution1
. The Python packages are designed for auto-execution on import, downloading JavaScript from an attacker-controlled GitHub Pages domain and running it using node -e, allowing the attacker to update behavior without publishing a new PyPI release1
.Socket's analysis suggests the attack shows signs of AI-assisted iteration, with broad security-themed scaffolding, generic lure repositories, prompt-injection documentation, and partially implemented extraction concepts mixed with working malware components
2
. The malicious package names are crafted to appear relevant to crypto development, AI tooling, local environment setup, and security workflows, giving the campaign broad reach across adjacent developer communities where crypto wallets, cloud credentials, GitHub tokens, and SSH keys are likely to be present1
2
. The findings demonstrate how threat actors are increasingly targeting developer workflows, aiming to steal a wide range of information that could enable them to burrow deeper into target environments for follow-on attacks, representing a significant evolution in the threat landscape facing modern development teams.
Source: Cointelegraph
Summarized by
Navi
[1]
[2]
09 Jun 2026•Technology

01 Jun 2026•Technology

28 Aug 2025•Technology

1
Science and Research

2
Policy and Regulation

3
Technology