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

hardhat-optionnpm

Advisory published Updated

hardhat-option is a confirmed malicious npm package (MAL-2026-17660) 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-option (npm)

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

What this malware does

[email protected] was published to npm on 2026-10-07 09:12 UTC and removed by npm on 2026-10-07 15:29 UTC. Like [email protected] (published the day before), the name targets the Ethereum development tool hardhat, and the package is a copy of the pino logger (README badges still point to pino) with one file added that pino does not contain: lib/config.js, a 4,499,968-byte obfuscated script. index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required. package.json carries the same fake author as hardhat-promised (Robert King [email protected]), no repository, and the added dependency axios.

Behavior observed when lib/config.js is loaded in an instrumented sandbox: axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=309 (hardhat-promised uses 301), a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Failed to spawn autoUploadScript', 'Failed to spawn ldbScript' and 'Failed to spawn socketScript', which name the same three stealer modules as hardhat-promised: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator.

Trigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087; second package of the hardhat-promised family.

The package's declared main index.js immediately requires./lib/config, which is a single-line ~4.5MB obfuscator.io-style bundle (26,234-entry hex-escaped string array, rotated decoder wrappers, control-flow flattening) whose top-level IIFE executes as soon as the module is loaded. The exported middleware is a no-op, so the sole effect of require('hardhat-option') is to run the opaque payload with the installer's privileges. The package also presents a false identity: the name is hardhat-option but README, index.d.ts and lib/* are copied from pinojs/pino and index.js re-exports module.exports.pino = middleware to satisfy consumers expecting pino's API, while package.json attributes authorship to 'Robert King [email protected]' with an unrelated bugs URL at jsonspack.com. A multi-megabyte, fully obfuscated module body that auto-executes on import inside a package falsely wrapped in another project's identity is the canonical loader/dropper shape.

Malicious versions

1 flagged
2.0.1

Indicators of compromise (SHA-256)

2d460f6c739361d793fbc66b2aa32d1d9ab6fe0df4caefe13c590f40d05d5277

Detection & response playbook

Credential / info stealer
  1. Find it

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

  2. If you installed it — respond

    hardhat-option 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-option 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-option 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-021119

References

Credits

  • Amazon Inspector · finder
  • Eunsoo Kim · finder

Detect & block this

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