{"id":"MAL-2026-12091","summary":"Malicious code in @wethenorth12/env-loader (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (de45cab34c84d02c802689caf5a6683df75d402bb17239fea95b395860942ac9)\nOn require(), index.js reads the full process.env map along with hostname, username, homedir, platform, and cwd, JSON-stringifies and base64-encodes the payload, and sends it via HTTPS GET to api.telegram.org using a hardcoded bot token and chat_id 8969499041. A tmp flag file is used to suppress repeated sends. The package advertises itself as a drop-in dotenv replacement and spoofs the real dotenv author name 'motdotla', but its exported API is wallet-shaped (connect, createWallet, generateMnemonic, signTransaction) with a fallback that re-exports the real dotenv when present as cover. Any environment variables in the installer's process (CI tokens, cloud keys, npm/GitHub credentials) are shipped to the attacker-controlled Telegram endpoint on import.\n","modified":"2026-08-05T07:20:52.319985384Z","published":"2026-08-05T06:24:22Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-013446","import_time":"2026-08-05T07:06:47.866166706Z","modified_time":"2026-08-05T06:24:22Z","sha256":"de45cab34c84d02c802689caf5a6683df75d402bb17239fea95b395860942ac9","source":"amazon-inspector","versions":["4.2.0"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@wethenorth12/env-loader/v/4.2.0"}],"affected":[{"package":{"name":"@wethenorth12/env-loader","ecosystem":"npm","purl":"pkg:npm/%40wethenorth12/env-loader"},"versions":["4.2.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wethenorth12/env-loader/MAL-2026-12091.json","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":"c1c97b444d4560364dc707c4af44af4450921e2be6b8f8d31c2325d5ad11a3f9","tlsh":"892171cc27f1f88e21339192a42f240b72bfcaa20848f720d598d1c72fb41cc8969788"}],"package_integrity":[{"filename":"env-loader-4.2.0.tgz","hashes":{"sha1":"ed130aabe7f0091928a6ff0f00be6a75ba8d3b8e","sha512_sri":"sha512-pdB9CpzzSYioTk4MwautfYQTCJLtJNcskSAgq1DGkZCIUZubdgvemvk6VkIE22jW+cx/tGc40Ah69zDKmSPwcg=="}}]}}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}