hardhat-gas-tracker (npm) · Malicious Code
Affects hardhat-gas-trackerSource GCVE Database
Malicious package : remove hardhat-gas-tracker and rotate any secrets on hosts that installed it.
Data as of 5 Aug 2026, 18:24 UTC
Malicious package
Published to npm · OSV MAL-2026-11020
What to do
Remove hardhat-gas-tracker 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
| Product | Affected | Fixed in |
|---|---|---|
| npmhardhat-gas-tracker | Affected
| 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-gas-tracker' version 1.0.1 contains malicious code that exfiltrates sensitive environment information to a third-party domain. Upon loading, it schedules a delayed network request that sends detailed system and environment data, including potentially sensitive deployment keys and tokens, to a Pipedream endpoint unrelated to its advertised functionality. This behavior is hidden behind error suppression and wrapped in legitimate utility functions, making detection difficult.