Skip to main content
MalwarePublished

hardhat-set (npm) · Malicious Code

Affects hardhat-setSource GCVE Database

0

Malicious package : remove hardhat-set and rotate any secrets on hosts that installed it.

Data as of 7 Aug 2026, 15:20 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-13609

What to do

Remove hardhat-set 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
npmhardhat-setAffected
  • =2.21.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 'hardhat-set' version 2.21.0 is a malicious typosquatting package masquerading as a legitimate project. It contains a large, heavily obfuscated JavaScript payload that executes immediately upon import. The package's README and documentation are copied from an unrelated project (pino logger), and the author information points to an unrelated domain, indicating deception. This package delivers a hidden payload to users who install or require it.

References

Community reviews

Loading reviews…