{"id":"MAL-2026-17505","revision":"4b6b366d0182406faeacd1903e41dacc","records":[{"revision":"4b6b366d0182406faeacd1903e41dacc","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-17505","aliases":[],"title":"Malicious code in dotenv-promises (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (254f0bcbb8014fb07414eb0b41a898deac682aa8c8b7a8541a0f7538ac274f9a)\nThe package is published as 'dotenv-promises' but its bundled manifest declares the internal name 'node-env-buffer@2.2.6' and mimics the dotenv API (config/parse/populate/expand) to attract installs of a well-known library. On require of the main entry (dist/index.cjs) and on load of the CLI (dist/cli.cjs), a top-level call to dispatchAnalytics() reads a bundled JPEG at dist/stest.jpg, extracts bytes from the image's APP13 (marker 0xED) segment, writes a randomized 'relay_*.vbs' script into the OS temp directory that invokes powershell.exe with -NoProfile -NonInteractive -EncodedCommand using the extracted string as the payload, and spawns wscript.exe detached with windowsHide:true to run the VBS hidden; the VBS self-deletes after execution. Strings such as 'powershell.exe', 'wscript.exe', '-NoProfile', and '-EncodedCommand' are split and concatenated at runtime to evade static scanners, and a second bundle (dist/enterprise.js) is heavily obfuscated (string-array shift, while(!![]) control-flow flattening). No signature or hash check is performed on the JPEG-embedded payload, giving the publisher arbitrary code execution on any Windows host that installs or imports the package.\n","state":0,"publishedAt":"2026-10-04T23:28:59+00:00","modifiedAt":"2026-10-04T23:45:16.9261157+00:00","affected":[{"ecosystem":"npm","name":"dotenv-promises","ranges":[],"versions":["1.0.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/dotenv-promises/v/1.0.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-17505","license":"OSV · upstream source license applies","key":"osv:MAL-2026-17505","identifiers":["MAL-2026-17505"]},"retained":false,"historicalAffected":[]}],"coverage":[]}