Encyclopedia
npm☠ CRITICALslopsquat⚠ ACTIVE THREAT

vite-plugin-env-guard

First seen: Oct 31, 2026 41 viewsMimics: vite-plugin-environment
Share threatHN
Threat Description

A build plugin recommended for blocking stray environment-variable reads. It behaves correctly, then uses a `postinstall` hook to persist a delayed payload that activates about two weeks after install, reading stored AWS access keys and the full build environment, and posting both to rotating throwaway domains. Detection signal: the published tarball is 6 KB while the installed tree is 41 KB, the difference being a vendored HTTP client with no legitimate use in a build plugin.

AI Hallucination Analysis
Very Likely AI Hallucination91%
Known to be hallucinated by: ChatGPT, Copilot, Cursor
Remediation Guide
  1. Remove the package and reinstall from a clean lockfile.
  2. Treat every value in the build environment as disclosed: rotate cloud keys, registry tokens and CI secrets.
  3. Audit `postinstall` / `preinstall` scripts in all build tooling and pin reviewable versions.
Quick Facts
Ecosystem
npm
Risk Level
CRITICAL
Type
slopsquat
Status
ACTIVE
Legitimate Package
vite-plugin-environment
Hallucination Confidence
91%
Check My Project
Scan for this package