OpenSSF/OSV advisory MAL-2026-12091 confirms this npm version as malicious. On 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...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @wethenorth12/env-loader (npm)
Details
On 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.
Decision reason
OpenSSF Malicious Packages via OSV confirms @wethenorth12/env-loader@4.2.0 as malicious (MAL-2026-12091): Malicious code in @wethenorth12/env-loader (npm)