Malicious code in env-local (npm)
--- _-= 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.
AI Analysis
Technical Summary
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.
Malicious code in env-local (npm)
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
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.