Malicious code in hardhat-gas-tracker (npm)
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.
AI Analysis
Technical Summary
The 'hardhat-gas-tracker' npm package version 1.0.1 is identified as malicious because it performs unauthorized data exfiltration. Specifically, on module load, it schedules a randomized timeout between 5 and 15 seconds to POST a JSON payload containing os.hostname(), os.userInfo().username, os.homedir(), and a full dump of process.env to a hardcoded Pipedream URL. In Hardhat development environments, process.env often contains sensitive private keys, mnemonics, API tokens, and provider keys. The network call is wrapped in silent try/catch blocks to suppress errors, and the package exposes gas-tracking utilities as a cover. This behavior leaks sensitive secrets to whoever controls the Pipedream endpoint, constituting a malicious backdoor in the package.
Potential Impact
Sensitive environment variables including deployment private keys, mnemonics, RPC provider keys, and API tokens can be exfiltrated to an attacker-controlled endpoint. This leakage can lead to compromise of blockchain deployments, unauthorized access to infrastructure, and potential financial loss. The malicious behavior is stealthy due to error suppression and legitimate-appearing utility functions, increasing the risk of unnoticed compromise in development environments using this package.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately remove 'hardhat-gas-tracker' version 1.0.1 from their projects and avoid using this package. Review environment variables and secrets for potential compromise and rotate any exposed credentials. Monitor for any unauthorized activity related to leaked keys. Consider using trusted package sources and scanning dependencies for malicious behavior before inclusion.
Malicious code in hardhat-gas-tracker (npm)
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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'hardhat-gas-tracker' npm package version 1.0.1 is identified as malicious because it performs unauthorized data exfiltration. Specifically, on module load, it schedules a randomized timeout between 5 and 15 seconds to POST a JSON payload containing os.hostname(), os.userInfo().username, os.homedir(), and a full dump of process.env to a hardcoded Pipedream URL. In Hardhat development environments, process.env often contains sensitive private keys, mnemonics, API tokens, and provider keys. The network call is wrapped in silent try/catch blocks to suppress errors, and the package exposes gas-tracking utilities as a cover. This behavior leaks sensitive secrets to whoever controls the Pipedream endpoint, constituting a malicious backdoor in the package.
Potential Impact
Sensitive environment variables including deployment private keys, mnemonics, RPC provider keys, and API tokens can be exfiltrated to an attacker-controlled endpoint. This leakage can lead to compromise of blockchain deployments, unauthorized access to infrastructure, and potential financial loss. The malicious behavior is stealthy due to error suppression and legitimate-appearing utility functions, increasing the risk of unnoticed compromise in development environments using this package.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately remove 'hardhat-gas-tracker' version 1.0.1 from their projects and avoid using this package. Review environment variables and secrets for potential compromise and rotate any exposed credentials. Monitor for any unauthorized activity related to leaked keys. Consider using trusted package sources and scanning dependencies for malicious behavior before inclusion.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-11020
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a616bcb9c2644c7f80dbc15
Added to database: 07/23/2026, 01:18:03 UTC
Last enriched: 08/05/2026, 18:24:17 UTC
Last updated: 09/01/2026, 05:57:29 UTC
Views: 65
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.