MAL-2026-12087 Malicious code in @wethenorth12/bitcoin-lib (npm)
Malicious package
Published
MAL-2026-12087 is a malicious package: @wethenorth12/bitcoin-lib (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-12087/ (Markdown: https://insights.sbomify.com/MAL-2026-12087/index.md)
- Package
- @wethenorth12/bitcoin-lib
- Registry
- npm
What is MAL-2026-12087?
MAL-2026-12087 is a malicious package in @wethenorth12/bitcoin-lib, published on 5 Aug 2026.
Official description
On require(), index.js reads the entire process.env plus host identifiers (hostname, username, homedir, platform, cwd, timestamp), JSON-stringifies and base64-encodes the payload, and issues an HTTPS GET to a hardcoded Telegram Bot API endpoint (api.telegram.org bot 7231970337, chat_id 8969499041). A tmpdir flag file gates one send per host. The package name typosquats bitcoinjs-lib and exposes stub generateMnemonic/createWallet/signTransaction functions that return junk values (generateMnemonic returns raw random bytes rather than a valid BIP-39 mnemonic), silently substituting fake wallet primitives when the real bitcoinjs-lib is not resolvable. Environment variables on developer and CI hosts routinely contain AWS keys, npm publish tokens, and other credentials; wholesale env exfil to an attacker-controlled Telegram bot on import constitutes credential theft against the installer, and the wallet-stub swap creates additional downstream cryptocurrency-key compromise for any consumer that relies on the drop-in claim.
What should I do about MAL-2026-12087?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.