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

hardhat-packnpm

Advisory published Updated

hardhat-pack is a confirmed malicious npm package (MAL-2026-17661) that steals credentials and exfiltrates sensitive data (malicious version 2.0.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in hardhat-pack (npm)

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

What this malware does

The package is published as hardhat-pack, a name shape that resembles the Hardhat Ethereum tooling ecosystem, but its README, LICENSE, TypeScript declarations and library source are copied verbatim from the unrelated pino logger. The only material divergence from upstream pino is that index.js adds const config = require('./lib/config'); at the top level, and lib/config.js is a single-line 4.4MB obfuscator.io payload: an IIFE with a ~26,000-entry hex-escaped string array and a rotating decoder. Nothing in the shipped source references config for a legitimate purpose, and the package carries no native build, no vendored SDK, and no other justification for a multi-megabyte opaque blob. The package also declares axios as a runtime dependency, consistent with network exfiltration or remote fetch from inside the decoded payload. Any process that imports hardhat-pack hands the opaque payload to the JavaScript engine on first require.

Malicious versions

1 flagged
2.0.1

Indicators of compromise (SHA-256)

b39859996d5d333a776d3ed42a203450ea588adefd91ba46a25a0bef0b17cf02

Detection & response playbook

Credential / info stealer
  1. Find it

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

  2. If you installed it — respond

    hardhat-pack is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.

  3. Did it already run?

    If hardhat-pack 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-pack 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-021133

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks hardhat-pack-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.

Explore

hardhat-pack (npm) malicious package — MAL-2026-17661 | O3 Security