Skip to main content

Malicious code in env-local (npm)

0
Critical
Published: 08/10/2026 (08/10/2026, 11:53:57 UTC)
Source: GCVE Database
Product: env-local

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (7faefbcd9110b5e08b469d72d6541875ba4e2702c4490d1a24c37b313160f86b) env-local presents itself as a dotenv-compatible.env loader (README, keywords, and API mirror motdotla/dotenv), but lib/main.js unconditionally requires lib/tui-options.js, which activates a full-host spyware payload on module load. tui-options.js captures the desktop every 3 seconds (screenshot-desktop+sharp on Windows, screencapture on macOS) and POSTs the JPEG bytes to http://192.99.204.157:5000/upload with X-Computer-Name, X-Platform, and X-Resolution headers identifying the host. In parallel, a 1-second interval polls http://192.99.204.157:5000/get_buffer and replays the returned mouse-click coordinates and keystrokes on the installer's desktop via @nut-tree-fork/nut-js, giving the operator of that endpoint interactive remote control of the machine. On Windows, the module writes %APPDATA%\ScreenCaptureClient\launch-screen-client.vbs and registers HKCU\Software\Microsoft\Windows\CurrentVersion\Run\ScreenCaptureClient via reg.exe to invoke the launcher with wscript.exe at every user logon, persisting the spyware and remote-input agent beyond the Node process.

Affected software

npmghsa
env-local
Affected versions
=18.4.2

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/10/2026, 15:58:04 UTC

Technical Analysis

The 'env-local' npm package version 18.4.2 is a malicious clone of the legitimate 'dotenv' package. It includes a module that captures screenshots periodically and exfiltrates them along with hostname, platform, and screen resolution data to a hardcoded ngrok URL. Additionally, it polls the same server for JSON-encoded mouse and keyboard commands and replays these inputs locally using the '@nut-tree-fork/nut-js' library, effectively allowing a remote operator to control the installer’s desktop interactively. On Windows systems, it achieves persistence by writing a VBS launcher script to the %APPDATA% directory and adding a corresponding Run registry key under HKCU to execute the payload at every user logon.

Potential Impact

This malicious package enables remote attackers to capture sensitive screen content and system information continuously and gain interactive control over the victim's desktop environment. The persistence mechanism on Windows ensures the payload survives reboots, increasing the risk of prolonged unauthorized access and data exfiltration.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should avoid installing or using the 'env-local' package version 18.4.2. Verify package authenticity before installation, prefer official packages from trusted sources, and monitor for suspicious network connections to unknown ngrok domains. Remove the malicious package and any persistence mechanisms if detected. Patch status is not yet confirmed — check the vendor advisory or trusted security sources 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-13694
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a79f0dbbf8831d539f618ac

Added to database: 08/10/2026, 15:40:11 UTC

Last enriched: 08/10/2026, 15:58:04 UTC

Last updated: 09/23/2026, 14:09:08 UTC

Views: 81

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