Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in expect-dotenv (npm)

0
Critical
Published: 08/20/2026 (08/20/2026, 03:32:44 UTC)
Source: GCVE Database
Product: expect-dotenv

Description

The npm package expect-dotenv version 7.2.1 contains malicious code that executes remote code from a concealed command-and-control server. When the package is required and its config() or get() functions are called, it fetches a string from a hidden URL, executes it in a Node.js VM context with full system privileges, allowing arbitrary code execution.

Affected software

npmghsa
expect-dotenv
Affected versions
=7.2.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/20/2026, 14:31:46 UTC

Technical Analysis

The expect-dotenv package (npm) version 7.2.1 includes a worker that performs an HTTPS GET request to a concealed remote endpoint (https://realase-0626.vercel.app/api/v1). The response's 'parser' string is executed via vm.runInContext with Node's require function passed in, enabling the remote code to run with full filesystem, network, and process privileges. The URL is obfuscated as a hex byte array and reassembled at runtime to hide the malicious command-and-control domain. This behavior triggers when the package is imported and its primary documented API methods .config() or .get() are invoked, masquerading as a legitimate dotenv configuration loader while executing arbitrary code.

Potential Impact

This malicious code allows an attacker controlling the remote endpoint to execute arbitrary code within the victim's Node.js process with full privileges, potentially leading to complete system compromise, data theft, or further malware deployment. The obfuscation of the C2 domain and execution within a VM context makes detection more difficult.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately stop using expect-dotenv version 7.2.1 and remove it from their projects. Verify dependencies for malicious packages and replace expect-dotenv with a trusted dotenv loader. Monitor for any unusual activity related to this package. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-14316
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a870a74acd9273b49b58ad2

Added to database: 08/20/2026, 14:08:52 UTC

Last enriched: 08/20/2026, 14:31:46 UTC

Last updated: 08/20/2026, 14:31:46 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses