{"id":"MAL-2026-12087","revision":"3bb58601f6de42e0944a6e2bb991c8a9","records":[{"revision":"3bb58601f6de42e0944a6e2bb991c8a9","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-12087","aliases":[],"title":"Malicious code in @wethenorth12/bitcoin-lib (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (34ac8cc76bddd60e41e530c9bb7cc74d902d3cb21a551db409bfdcac50a99cb8)\nOn 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.\n","state":0,"publishedAt":"2026-08-05T06:25:08+00:00","modifiedAt":"2026-08-05T07:20:50.6500532+00:00","affected":[{"ecosystem":"npm","name":"@wethenorth12/bitcoin-lib","ranges":[],"versions":["6.1.7"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/@wethenorth12/bitcoin-lib/v/6.1.7"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-12087","license":"OSV · upstream source license applies","key":"osv:MAL-2026-12087","identifiers":["MAL-2026-12087"]},"retained":false,"historicalAffected":[]}],"coverage":[]}