Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in expect-dotenv (npm)

The npm package expect-dotenv contained malicious code that executed arbitrary remote code on package installation and use. When required and configured via .config() or .get(), the package fetched and executed code from a remote C2 server (realase-0626.vercel.app) with full Node.js process privileges.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any Node.js application that installed and used expect-dotenv with .config() or .get() method calls
Ecosystems
Attack vectors
Affected entities
  • expect-dotenvnpm package containing malicious code

The npm package expect-dotenv was compromised with malicious code that performs remote code execution. Upon requiring the package and calling its primary API methods (.config() or .get()), a worker thread initiates an HTTPS GET request to https://realase-0626.vercel.app/api/v1 and passes the response's parser string into vm.runInContext, then invokes the resulting function with Node's require function available in scope.\n\nThe C2 domain is obfuscated as a hex byte array in constants.js (pluginIDs) and reassembled at runtime via String.fromCharCode to evade casual inspection. The vm.runInContext sandbox is trivially escapable since the require function is passed directly into the context, granting the remote endpoint full code execution with filesystem, network, and process privileges.\n\nThe malicious behavior is triggered on the package's documented primary API surface (.config() or .get() methods), masquerading as a dotenv-style configuration loader. This was identified by Amazon Inspector and credited to the OpenSSF malicious-packages repository.

Indicators of compromise

Packages
  • expect-dotenv
Domains
  • realase-0626.vercel.app

Remediation

  • Immediately uninstall expect-dotenv from all projects
  • Audit npm install logs and package-lock.json to identify when expect-dotenv was installed
  • Review process execution logs and network connections from affected systems during the period expect-dotenv was installed
  • Rotate all credentials and secrets that may have been exposed to the compromised process
  • Update to a patched version if available, or use an alternative dotenv package
  • Implement package integrity verification and supply chain security scanning in CI/CD pipelines

Sources

  1. GitHub Advisory GHSA-r76x-fxpp-j74m · GitHub Advisory Database

Cite this entry

"Malicious code in expect-dotenv (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 20, 2026; last updated August 20, 2026. https://supplychainattack.org/incident/malicious-code-in-expect-dotenv-npm-xn14pu

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. containedcritical

    Malware in svelte-dim-kit

    The npm package svelte-dim-kit was found to contain malware, potentially giving attackers full control of affected systems. All systems with this package installed should be considered compromised and secrets/keys rotated immediately from a different computer.

    npmCompromised package
  2. containedcritical

    Malicious code in @syncraft-labs/react (npm)

    The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.

    npmCompromised package
  3. containedcritical

    Malicious code in stillm4ddpocs-demo-sprocket (npm)

    The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.

    npmCompromised packageDependency confusion
  4. resolvedcritical

    Malicious code in stillm4ddpocs-rtest-bravo (npm)

    The npm package stillm4ddpocs-rtest-bravo contained malicious code in its preinstall script that automatically executed during installation, collecting system information and internal package metadata and exfiltrating it to a third-party Interactsh collector via HTTPS and DNS tunneling.

    npmCompromised package