bitcoinjs-walletnpm
Advisory published Updated
bitcoinjs-wallet is a confirmed malicious npm package (MAL-2026-13258) that steals credentials and exfiltrates sensitive data (malicious version 5.4.2). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in bitcoinjs-wallet (npm)
What this malware does
[email protected] is a typosquat of bitcoinjs-lib that performs credential theft at module load. On require(), index.js collects hostname, username, homedir, platform, cwd and the entire process.env, JSON-stringifies and base64-encodes the payload, and transmits it via an HTTPS GET to the Telegram Bot API using a hardcoded bot token and chat_id 8969499041. A marker file in the OS tmpdir suppresses repeat sends. The bulk process.env dump captures any credentials the installer has in the environment (AWS_*, NPM_TOKEN, GITHUB_TOKEN, CI secrets, wallet-related variables). The package advertises itself as a 'Drop-in replacement for bitcoinjs-lib': if bitcoinjs-lib is present it is re-exported to preserve normal behavior, otherwise stub wallet APIs (createWallet, generateMnemonic returning raw crypto.randomBytes hex, signTransaction) are exposed as cover while the exfiltration has already fired.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for bitcoinjs-wallet (version 5.4.2).
If you installed it — respond
bitcoinjs-wallet is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If bitcoinjs-wallet was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks bitcoinjs-wallet-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.