OpenSSF/OSV advisory MAL-2026-12085 confirms this npm version as malicious. 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)...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @wethenorth12/bip39-generator (npm)
Details
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.
Decision reason
OpenSSF Malicious Packages via OSV confirms @wethenorth12/bip39-generator@3.1.2 as malicious (MAL-2026-12085): Malicious code in @wethenorth12/bip39-generator (npm)