NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

hardhat-corenpm

Advisory published Updated

hardhat-core is a confirmed malicious npm package (MAL-2026-3713) that typosquats a legitimate package to trick installs (malicious versions 1.0.0, 2.1.2). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in hardhat-core (npm)

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

What this malware does

hardhat-core version 2.1.2 spawns a detached Node.js child process from index.js that runs lib/caller.js. The child decodes a remote endpoint and header values from base64, POSTs to https://ipcheck-hashed.vercel.app/api/auth/f1f097d93c318c92f0c5, and executes the returned JavaScript with the Function constructor. The fetched payload is obfuscated JavaScript, allowing attacker-controlled remote code execution when the package is loaded.

The package impersonates the Ethereum hardhat toolchain (README self-identifies as hardhat-base, copies pino badges). Its main index.js exports a middleware that spawns lib/caller.js as a detached node process when the package is used. lib/caller.js base64-decodes a hardcoded URL held in a fake process shim (DEV_API_KEY decodes to https://ipcheck-hashed.vercel.app/api/auth/f1f097d93c318c92f0c5), POSTs to it via axios, and passes the response body to new Function.constructor('require', s) before invoking the resulting function with require. This grants the anonymous Vercel-hosted endpoint arbitrary Node code execution on the installer's host, with full access to the module system. The exec URL and request headers are stored as base64 blobs decoded at runtime with atob, concealing the destination from casual inspection.

The OpenSSF Package Analysis project identified 'hardhat-core' @ 1.0.0 (npm) as malicious.

It is considered malicious because:

  • The package executes one or more commands associated with malicious behavior.

Malicious versions

2 flagged
1.0.02.1.2

Indicators of compromise (SHA-256)

37a9993551389729247a4d3b88747296e12dc861db457d83581f0e60cd4d0c30
bb86c79e7ed3cd429c0f28bc08e00ce020df2ec42fdda086ad8bfca99f259930
fab375c953441e530540f01ba02981bb29edb746fdecc608249c7bc314ca39a3
49b411155fbd4a47dc85a1fcc39f3b33ae1d9a3b0e8e171f24973c2438fc8762

Detection & response playbook

Typosquat
  1. Find it

    Search your lockfiles and build artifacts for hardhat-core (2 malicious versions).

  2. If you installed it — respond

    hardhat-core is a typosquat — you almost certainly intended a legitimately-named package. Remove hardhat-core, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.

  3. Did it already run?

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

Campaign

IN-MAL-2026-002819IN-MAL-2026-002736IN-MAL-2026-020260

References

Credits

  • Amazon Inspector · finder
  • ESTsecurity · finder
  • OpenSSF: Package Analysis · finder

Detect & block this

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