Skip to main content
MalwarePublished Updated

date-fns-lite (npm) · Malicious Code

Affects date-fns-liteSource GCVE Database

0

Malicious package : remove date-fns-lite and rotate any secrets on hosts that installed it.

Data as of 26 Oct 2026, 15:56 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-6722

What to do

Remove date-fns-lite 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
npmdate-fns-liteAffected
  • 1.0.0 – 1.0.12
13 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 'date-fns-lite' versions 1.0.0 through 1.0.12 is a malicious package that masquerades as a lightweight date-formatting utility. It contains a postinstall script that executes automatically upon installation, harvesting sensitive credentials and configuration files from the host, including AWS, GCP, and Azure credentials, SSH keys, kubeconfig, /etc/shadow, and shell history. It also performs reconnaissance by querying cloud metadata services, enumerating Docker containers, and scanning the internal network. The collected data is sent to a hardcoded external IP address over unencrypted HTTP. This package poses a significant risk especially when installed in CI environments or containers with host filesystem mounts.

References

Community reviews

Loading reviews…