MAL-2026-17233 Malicious code in hardhat-lock (npm)
Malicious package
Published
MAL-2026-17233 is a malicious package: hardhat-lock (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-17233/ (Markdown: https://insights.sbomify.com/MAL-2026-17233/index.md)
- Package
- hardhat-lock
- Registry
- npm
What is MAL-2026-17233?
MAL-2026-17233 is a malicious package in hardhat-lock, published on 28 Sep 2026.
Official description
The npm package [email protected] publishes itself as a logger/middleware but its identity and contents are inconsistent with that purpose: README badges, LICENSE, index.d.ts and docs/* are copied from the unrelated pino project (maintained by pinojs), while the package name squats the Ethereum-tooling keyword 'hardhat'. index.js unconditionally executes require('./lib/config') at module load, and lib/config.js is a ~4MB obfuscator.io-style single-line file (rotated string array of 23,981 entries, hex-escaped tokens, numeric wrapper decoders mt/mw/M0..M5/K/R/s/G, control-flow flattening, and 40,131 inline decoder replacements confirmed by webcrack) whose top-level IIFE runs the moment any downstream code does require('hardhat-lock'). The combination — impersonation of an established package under a different scope-adjacent name, opaque multi-megabyte obfuscated blob with no plausible logging use, and guaranteed import-time execution — is a supply-chain payload carrier: installing and loading the package places attacker-controlled code inside the consumer's Node.js process with unrestricted access to environment variables, filesystem, and network.
What should I do about MAL-2026-17233?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.