npm · Malicious package advisory
Malware@wethenorth12/bip39-generator
MAL-2026-12085
Malicious code in @wethenorth12/bip39-generator (npm)
Details
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (e4fe167500fb5cab9e31d00a5239bf7ce46ba4205b4c6c044367f424d3285687)
Package presents itself as a drop-in replacement for the popular `bip39` library but ships a credential stealer in its main entry. On require, the module serializes the full process.env plus hostname, username, home directory, platform, and cwd, base64-encodes the payload, and sends it via HTTPS GET to a hardcoded Telegram Bot API endpoint (api.telegram.org/bot<token>/sendMessage?chat_id=8969499041). A marker file ('.npi-...') is written to /tmp to ensure the beacon fires only once per host. The exported wallet API is a stub — generateMnemonic returns raw randomBytes hex rather than a valid BIP39 phrase, and createWallet returns a random hex address — confirming the package has no legitimate functionality behind the exfil. Bulk process.env dumps routinely contain AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN, NPM_TOKEN, database passwords, and CI secrets, all of which are captured and delivered to the attacker's Telegram chat.
Compromised versions (1)
- 3.1.2
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.