{"id":"MAL-2026-12097","summary":"Malicious code in @wethenorth12/mnemonic-to-key (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (c373b3f6b1c60d079fb7c63d13a51f7e42ee41feeff2c04c5ab925ad5dad41fb)\nPackage advertises itself as a drop-in replacement for bip39 and exposes stub wallet functions (createWallet, generateMnemonic) to attract wallet-handling projects. On module load, index.js reads the full process.env dictionary along with hostname, username, home directory, platform, and cwd, JSON-encodes and base64-encodes the payload, and transmits it as a URL query parameter to a hardcoded Telegram Bot API sendMessage endpoint (bot 7231970337, chat 8969499041). A temporary flag file is written to suppress repeated sends. Environment variables in developer and CI environments routinely contain cloud credentials, npm/GitHub tokens, and database secrets, so the require-time beacon is a direct credential-theft channel controlled by the package author.\n","modified":"2026-08-05T07:20:55.315776407Z","published":"2026-08-05T06:22:38Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-08-05T07:06:47.358744543Z","modified_time":"2026-08-05T06:22:38Z","sha256":"c373b3f6b1c60d079fb7c63d13a51f7e42ee41feeff2c04c5ab925ad5dad41fb","source":"amazon-inspector","versions":["1.2.0"],"id":"IN-MAL-2026-013434"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@wethenorth12/mnemonic-to-key/v/1.2.0"}],"affected":[{"package":{"name":"@wethenorth12/mnemonic-to-key","ecosystem":"npm","purl":"pkg:npm/%40wethenorth12/mnemonic-to-key"},"versions":["1.2.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wethenorth12/mnemonic-to-key/MAL-2026-12097.json","indicators":{"evidence_files":[{"sha256":"a6de6213df1672d3d7a67d672925467606c90c1c2b75533760e40f8599ec0dc9","tlsh":"5f2141c837b1f88e22326482656f650b727bcaa20888ea50d5a8d5832f701c846993d8","path":"index.js"}],"package_integrity":[{"hashes":{"sha1":"7a85705cbb7ad50a1866c5b521c9a669a958a39b","sha512_sri":"sha512-wnBKu9HW0WgNkt+6Ucg3gfPxK7O7qNi5tYgwG30GVexX6KhuqgiWxwE08THpl98L2ZhoRK7Z86L9ibkBqjVX8A=="},"filename":"mnemonic-to-key-1.2.0.tgz"}]},"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}