envparse2@1.0.1
Malicious code in envparse2 (npm)
Analysis
envparse2@1.0.1 is a trojanized environment-configuration package. On require() of the main entry or execution of its dot2env bin, it reads a bundled 287KB file dist/stest.jpg (a JPEG polyglot), extracts an embedded base64-encoded PowerShell command from the JPEG APP13 metadata marker, writes a self-deleting VBScript relay_<timestamp><random>.vbs into the OS temp directory, and spawns wscript.exe detached and hidden to execute the encoded PowerShell payload. The VBScript deletes itself after launching. The PowerShell payload is delivered via -EncodedCommand and its contents are hidden inside the image file.
- analyzed by
- Leitwacht
- first seen
- Sep 22, 2026, 05:25 PM
- analyzed
- Sep 22, 2026, 05:27 PM
Related advisories
- envparse3@1.0.1
- noblox-asset.js@7.4.1
- node-helper@1.5.4
- @stellarshift/chain-metadata@1.0.1
- @stellarshift/evm-address-kit@1.0.1
- moidevy@1.0.0
- dev-env-check@1.0.3
- sbirontime@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.