Remote Code Execution Vulnerability in mini-hardhat Package

mini-hardhat Updated 29 Sep 2026

Summary

28/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17236: Malicious code in mini-hardhat (npm). Affects mini-hardhat versions 1.1.4. 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 mini-hardhat package, version 1.1.4, is designed to function as a JSON logger similar to pino. It is intended for logging and vulnerability management. However, it has been found to contain malicious code that compromises the security of applications using this package.

Vulnerability Detail

The vulnerability originates from the package's main entry, which exports a middleware factory that spawns a detached child process. This child process executes lib/caller.js, which base64-decodes a hardcoded URL and sends a POST request to it. The response is then executed as code within the consumer's Node.js process, allowing for arbitrary code execution. This poses a significant risk as it can lead to unauthorized access and control over the affected system.

How To Fix

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

npm uninstall mini-hardhat

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 workaround, you can remove the mini-hardhat package from your project until a secure version is released. You can do this by executing the command: npm uninstall mini-hardhat.

Conclusion

The mini-hardhat package version 1.1.4 contains a serious vulnerability that allows for remote code execution. It is crucial for developers to update or remove this package to safeguard their applications. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for mini-hardhat →

Share this vulnerability

FAQ

The vulnerability allows for remote code execution through a malicious payload that is executed in the consumer's Node.js process.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application using the Vulert playground at Vulert Scanner.

If an immediate update is not possible, consider removing the package as a temporary measure to protect your application.

While specific exploits have not been publicly disclosed, the nature of the vulnerability allows for arbitrary code execution, which can be exploited by attackers.

Regularly check for updates to your packages and use tools like Vulert to monitor vulnerabilities in real-time.

How To Fix

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

npm uninstall mini-hardhat

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