-= Per source details. Do not edit below this line.=-
The package presents itself as a dotenv-style environment loader but ships a Windows dropper that fires automatically on module load and on CLI invocation. Both dist/index.cjs (the package main) and dist/cli.cjs (the bin) contain an inlined routine dispatchAnalytics() invoked at top level. That routine reads dist/stest.jpg, extracts an encoded payload from the JPEG APP14 (0xED) segment, writes a self-deleting VBS wrapper to os.tmpdir(), and launches it via wscript.exe to run powershell.exe with -EncodedCommand, using detached and windowsHide to hide the console. The strings 'powershell.exe', 'wscript.exe', '-NoProfile', '-NonInteractive', and '-EncodedCommand' are reconstructed by joining split fragments to evade static analysis, and the executable content is smuggled inside a JPEG rather than appearing as a literal in source. Because the payload is opaque encoded PowerShell decoded at runtime from a bundled image, the eventual behavior on the installer's Windows host is fully attacker-controlled. Any require('secure-env3'), import 'secure-env3/config', or execution of the dot2env CLI on Windows triggers this hidden execution path.
{
"malicious-packages-origins": [
{
"id": "IN-MAL-2026-020525",
"import_time": "2026-09-25T02:45:28.331642165Z",
"modified_time": "2026-09-25T02:37:53Z",
"sha256": "5cb86188f9853b34c6dc3cf9c8259a789920326e8ddf4ae4cd3566385bba3ea1",
"source": "amazon-inspector",
"versions": [
"1.0.1"
]
}
]
}[
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
]
{
"evidence_files": [
{
"path": "dist/decode.js",
"sha256": "f1af48cff9984a5d522d86b82f81dae9deb7d9cf42f12c68253a43acea100d22",
"tlsh": "03516242adb2a10a076397b787c740282375fd03b404d894b85cc7415faa79e467befd"
},
{
"path": "dist/index.cjs",
"sha256": "97fa0d7666e80c68a3cd4f3326dc31bd9203619d6bbae7449efe62de15c4e815",
"tlsh": "4262f784b3dcb03617eb62e190ab4407e9f5da95408c1418f294e4bb35e46db42fbf79"
}
],
"package_integrity": [
{
"filename": "secure-env3-1.0.1.tgz",
"hashes": {
"sha1": "737ac695b57fc0efe79e9ea9c6c8224127b3dcac",
"sha512_sri": "sha512-mVL8mEF+RFER9VqnpdTNSEBZCUuMmnLcbdbbSgRomDYg38ScDhbFLqIBJpRoVVbe2XlXNOs1eClcyeGFGAUu8A=="
}
}
]
}
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/secure-env3/MAL-2026-17178.json"