Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

hardhat-deepnpm

Advisory published Updated

hardhat-deep is a confirmed malicious npm package (MAL-2026-17659) that executes malicious code on install (malicious version 2.0.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in hardhat-deep (npm)

MAL-2026-17659
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall hardhat-deep

What this malware does

The npm package [email protected] is a trojanised shell. Its tarball copies the pino logger source tree (README, SECURITY.md, index.d.ts, lib/proto.js, lib/transport.js, lib/worker.js, lib/levels.js, lib/multistream.js, etc.) verbatim, while the package name and manifest description target the Hardhat ecosystem. The only novel file is lib/config.js, a single-line 4,499,968-byte obfuscator.io bundle with a 26,234-entry rotated string array, two decoder functions, hex-encoded strings and control-flow flattening. The package's top-level index.js is modified from pino's original to unconditionally require('./lib/config'), so any consumer that requires or imports hardhat-deep executes this opaque payload inside the installer's Node process. The exported middleware is a no-op cover with no logger functionality, so running the obfuscated blob is the only effect of installing or loading the package. The author identity (Robert King [email protected], jsonspack.com) is unrelated to either Hardhat or pinojs.

Malicious versions

1 flagged
2.0.1

Indicators of compromise (SHA-256)

fde0a4a0ec197ee1aab9acf20ea157268b553fdb5669c545c27d92cbf89fe304

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for hardhat-deep (version 2.0.1).

  2. If you installed it — respond

    Remove hardhat-deep from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If hardhat-deep was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. hardhat-deep on npm has been identified as a malicious package (version 2.0.1 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-021132

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks hardhat-deep-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

hardhat-deep (npm) malicious package — MAL-2026-17659 | O3 Security