MAL-2026-16348 Malicious code in hardhat-base (npm)
Malicious package
Published
MAL-2026-16348 is a malicious package: hardhat-base (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-16348/ (Markdown: https://insights.sbomify.com/MAL-2026-16348/index.md)
- Package
- hardhat-base
- Registry
- npm
What is MAL-2026-16348?
MAL-2026-16348 is a malicious package in hardhat-base, published on 21 Sep 2026.
Official description
Package presents itself as a pino-compatible logger (module.exports.pino = middleware; keywords fast/logger/stream/json) but ships an RCE loader. index.js spawns lib/caller.js as a detached child process on middleware invocation. caller.js reads a base64-encoded URL from a fake process.env-shaped constant (DEV_API_KEY), decodes it via atob to https://ipcheck-hashed.vercel.app/api/auth/f1f097d93c318c92f0c5, POSTs to that endpoint via axios, and passes the response body to new Function.constructor("require", s) — invoking the returned handler with the real require function. Any consumer that requires this package and calls the exported middleware fetches and executes arbitrary attacker-controlled JavaScript with full Node.js require access. The base64 concealment of the endpoint inside fake env-var constants, the detached child spawn, the cover-story pino API surface, and the mismatch with the manifest description (vulnerability-management text) confirm intentional supply-chain attack rather than an insecure update mechanism.
What should I do about MAL-2026-16348?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.