Skip to main content
MalwarePublished Updated

dotenv-express (npm) · Malicious Code

Affects dotenv-expressSource GCVE Database

0

Malicious package : remove dotenv-express and rotate any secrets on hosts that installed it.

Data as of 12 Sep 2026, 20:32 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-2350

What to do

Remove dotenv-express from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmdotenv-expresspkg:npm/dotenv-expressOther threatsAffected
  • 2.5.5 – 17.4.6
6 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The npm package 'dotenv-express' impersonates the popular 'dotenv' package by copying its code and metadata but adds a malicious dependency 'environment-gate' that executes code on every standard API call. This deliberate namespace abuse tricks users and AI coding agents into treating it as the genuine package. Installing this package can lead to full system compromise, and all secrets and keys on affected machines should be rotated immediately.

References

Community reviews

Loading reviews…