MAL-2026-17636 Malicious code in hardhat-init (npm)
Malicious package
Published
MAL-2026-17636 is a malicious package: hardhat-init (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-17636/ (Markdown: https://insights.sbomify.com/MAL-2026-17636/index.md)
- Package
- hardhat-init
- Registry
- npm
What is MAL-2026-17636?
MAL-2026-17636 is a malicious package in hardhat-init, published on 6 Oct 2026.
Official description
The npm package hardhat-init presents itself as Hardhat initialization tooling and ships a README, LICENSE, and index.d.ts copied from the pino logger project with the name substituted. The main entry index.js requires./lib/config at the top level, which triggers a ~4.3MB heavily obfuscated JavaScript file (lib/config.js) whose top-level IIFE executes immediately on module load. The obfuscation uses hex-escaped string tables, nested index-lookup helpers, and a string-array shuffler consistent with obfuscator.io output, with no plaintext surface describing the behavior. The exported index.js is a trivial no-op that does not consume anything from lib/config, so the sole effect of loading the package is to execute the opaque payload. The combination of a name/content mismatch (hardhat-init vs. copied pino scaffolding), an oversized obfuscated sibling file with no legitimate purpose for an init helper, and auto-execution on require is a typosquat loader shape that causes arbitrary attacker-controlled code to run on the installer's machine the first time any consumer imports the package.
What should I do about MAL-2026-17636?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.