{"id":"MAL-2026-17178","revision":"a0a967da889449efbde79548884bc019","records":[{"revision":"a0a967da889449efbde79548884bc019","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-17178","aliases":[],"title":"Malicious code in secure-env3 (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5cb86188f9853b34c6dc3cf9c8259a789920326e8ddf4ae4cd3566385bba3ea1)\nThe 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.\n","state":0,"publishedAt":"2026-09-25T02:37:53+00:00","modifiedAt":"2026-09-25T03:00:07.5298078+00:00","affected":[{"ecosystem":"npm","name":"secure-env3","ranges":[],"versions":["1.0.1"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/secure-env3/v/1.0.1"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-17178","license":"OSV · upstream source license applies","key":"osv:MAL-2026-17178","identifiers":["MAL-2026-17178"]},"retained":false,"historicalAffected":[]}],"coverage":[]}