MAL-2026-12088Malicious code in @wethenorth12/bitcoinjs-wallet (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | @wethenorth12/bitcoinjs-wallet | 5.4.2 |
{"modified":"2026-08-05T06:24:40Z","published":"2026-08-05T06:24:40Z","schema_version":"1.7.4","id":"MAL-2026-12088","summary":"Malicious code in @wethenorth12/bitcoinjs-wallet (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (94f602036ff9f524298056528fbec6c58c9fb66ea2686bec418694b5854aeea4)\nOn require(), index.js collects the full process.env object together with hostname, username, home directory, platform, current working directory, and a timestamp, JSON-encodes and base64-encodes the payload, and issues an HTTPS GET to api.telegram.org/bot<token>/sendMessage with a hardcoded bot token and chat_id. A tmp-file flag suppresses re-sending. The package advertises itself as a 'Drop-in replacement for bitcoinjs-lib' under an unrelated scope and ships only stub wallet functions alongside this exfiltration payload, consistent with a typosquat lure targeting bitcoinjs-lib users. In modern development and CI environments, process.env routinely contains cloud credentials, npm/GitHub tokens, and database passwords, all of which are sent to the attacker-controlled Telegram chat on module load.\n","affected":[{"package":{"ecosystem":"npm","name":"@wethenorth12/bitcoinjs-wallet"},"versions":["5.4.2"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"3d3afcdc0d19893d0b3b9448f5f98f669bb799388a036204fd12d688d871297c","tlsh":"182166dc27f1f94e22336142542f610ab2bbdae20488e661d5a4d0c76f741cc8d6578c"}],"package_integrity":[{"filename":"bitcoinjs-wallet-5.4.2.tgz","hashes":{"sha1":"3e4d74e82b4957f614894357e53b73713f10b5f1","sha512_sri":"sha512-NaTj2ORja1/HDr9AvfSfgE4je3AYkD5VqMKiVJ4M9BRfpQMEaXTPoOAOYmhTtBHAD5/m5zdO2BJjGU+9FYJHog=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@wethenorth12/bitcoinjs-wallet/v/5.4.2"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-013448","import_time":"2026-08-05T07:06:47.939782616Z","modified_time":"2026-08-05T06:24:40Z","sha256":"94f602036ff9f524298056528fbec6c58c9fb66ea2686bec418694b5854aeea4","source":"amazon-inspector","versions":["5.4.2"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0