Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

dotenv-promisesnpm

Advisory published Updated

dotenv-promises is a confirmed malicious npm package (MAL-2026-17505) that runs destructive / sabotage code (malicious version 1.0.0). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in dotenv-promises (npm)

MAL-2026-17505
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall dotenv-promises

What this malware does

The package is published as 'dotenv-promises' but its bundled manifest declares the internal name '[email protected]' 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.

Malicious versions

1 flagged
1.0.0

Indicators of compromise (SHA-256)

254f0bcbb8014fb07414eb0b41a898deac682aa8c8b7a8541a0f7538ac274f9a

Detection & response playbook

Destructive / sabotage
  1. Find it

    Search your lockfiles and build artifacts for dotenv-promises (version 1.0.0).

  2. If you installed it — respond

    dotenv-promises carries a destructive/sabotage payload. Remove it immediately, restore any affected data from clean backups, and verify integrity of build outputs that may have been tampered with.

  3. Did it already run?

    If dotenv-promises was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. dotenv-promises on npm has been identified as a malicious package (version 1.0.0 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-020977

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks dotenv-promises-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

dotenv-promises (npm) malicious package — MAL-2026-17505 | O3 Security