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

hardhat-spacknpm

Advisory published Updated

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

Malicious code in hardhat-spack (npm)

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

What this malware does

The package is published as hardhat-spack but presents itself internally as a pino-like logger. Its main export is a middleware factory that spawns lib/caller.js as a detached child process. caller.js and lib/const.js define a fake process.env object whose DEV_API_KEY, DEV_SECRET_KEY, and DEV_SECRET_VALUE are base64 blobs; DEV_API_KEY decodes to https://iphub-encrypted.vercel.app/api/auth/f1f097d93c318c92f0c5. caller.js base64-decodes that URL, POSTs to it, and passes the response body to new Function.constructor("require", s) and invokes it with the real require, giving the fetched JavaScript full Node capabilities (filesystem, child_process, network). The request is retried up to five times and failures are swallowed. The destination host is disposable Vercel infrastructure unrelated to any declared purpose, the URL and credential-shaped values are concealed with base64, and the executed code is attacker-mutable at any time.

Malicious versions

1 flagged
3.0.2

Indicators of compromise (SHA-256)

e59c971c63de9d0a7f66c26093f528164990af10eca00a3a36b97d0c8b0a6d0d

Detection & response playbook

Credential / info stealer
  1. Find it

    Search your lockfiles and build artifacts for hardhat-spack (version 3.0.2).

  2. If you installed it — respond

    hardhat-spack 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-spack 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-spack on npm has been identified as a malicious package (version 3.0.2 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-020999

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks hardhat-spack-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-spack (npm) malicious package — MAL-2026-17560 | O3 Security