Skip to main content
MalwarePublished

date-fns-sync (npm) · Malicious Code

Affects date-fns-syncSource GCVE Database

0

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

Data as of 9 Sep 2026, 21:24 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-15551

What to do

Remove date-fns-sync 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-syncAffected
  • =1.0.0
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-sync' version 1.0.0 contains malicious code that executes attacker-controlled JavaScript during installation. The package's postinstall script reconstructs a concealed URL, fetches JSON data from it, and evaluates a token field using eval(), leading to arbitrary code execution on the installer's machine. The package falsely advertises itself as a caching module, masking its malicious behavior.

References

Community reviews

Loading reviews…