Malicious Code Detected in hardhat-zet Package: A Supply-Chain Threat

hardhat-zet Updated 29 Sep 2026

Summary

28/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17234: Malicious code in hardhat-zet (npm). Affects hardhat-zet versions 2.0.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The hardhat-zet package, version 2.0.1, is a Node.js package that appears to target developers in the Ethereum ecosystem. It is designed to integrate with the Hardhat Ethereum tooling, which is widely used for developing smart contracts. However, this package has been found to impersonate the Hardhat ecosystem, raising significant security concerns due to its malicious nature.

Vulnerability Detail

The vulnerability stems from the hardhat-zet package being a trojan horse, where its README and documentation are copied from the unrelated pino logger project. The package exports a no-op middleware and contains a large, obfuscated payload that executes automatically upon import. This obfuscation makes it difficult to observe its behavior, posing a risk of supply-chain attacks targeting Ethereum developers. The malicious code is designed to steal sensitive information, making it a serious threat.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall hardhat-zet

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary measure, avoid using the hardhat-zet package and ensure that your project does not include it in your dependencies. Regularly audit your package.json and package-lock.json files to identify and remove any suspicious packages.

Conclusion

The hardhat-zet package poses a significant risk to developers in the Ethereum ecosystem due to its malicious code and deceptive practices. It is essential to remove this package from your projects and monitor for vulnerabilities using tools like Vulert to ensure the security of your applications.

See every vulnerability recorded for hardhat-zet →

Share this vulnerability

FAQ

hardhat-zet is a Node.js package that falsely claims to be part of the Hardhat Ethereum tooling ecosystem but contains malicious code.

The malicious code is obfuscated and executes automatically when the package is imported, making it difficult to detect its harmful actions.

You should immediately uninstall the package using 'npm uninstall hardhat-zet' and check your project for any other suspicious dependencies.

You can use Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time. You can check your application for vulnerabilities using the Vulert playground without needing to sign up.

Yes, consider using legitimate packages from the Hardhat ecosystem or other well-known libraries that are actively maintained and have a good reputation.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall hardhat-zet

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback