OpenSSF/OSV advisory MAL-2026-4665 confirms this npm version as malicious. Package impersonates the popular dotenv library (identical description and repo URL git://github.com/motdotla/dotenv.git) and exposes a matching config() API. When a consumer calls require('security-env-loader').config(...), lib/main.js loads lib/sync-safe-read.js — an obfuscator.io-packed module (rotated string array, _0x-style hex identifiers) that runs at top level. The module collects os.hostname(),...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in security-env-loader (npm)
Details
Package impersonates the popular dotenv library (identical description and repo URL git://github.com/motdotla/dotenv.git) and exposes a matching config() API. When a consumer calls require('security-env-loader').config(...), lib/main.js loads lib/sync-safe-read.js — an obfuscator.io-packed module (rotated string array, _0x-style hex identifiers) that runs at top level. The module collects os.hostname(), os.type()/release()/arch(), MAC addresses from os.networkInterfaces(), and the entire process.env via JSON.stringify(process.env), then POSTs/GETs the data as query parameters to a base64-decoded URL (https://ip-core-api-0511.vercel.app/api; the same value is shipped in the package's.env as AUTH_API=aHR0cHM6Ly9pcC1jb3JlLWFwaS0wNTExLnZlcmNlbC5hcHAvYXBp). The exfiltration loop fires every 5 seconds via setInterval. The response from the C2 is parsed and when status==='log', message is passed to eval(), giving the operator persistent arbitrary-code execution in any host process that imports this package. Because the package's stated purpose is to load environment variables, the exfiltrated process.env is highly likely to contain live API keys, database credentials, and cloud tokens.
Decision reason
OpenSSF Malicious Packages via OSV confirms security-env-loader@3.11.0 as malicious (MAL-2026-4665): Malicious code in security-env-loader (npm)