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.
-= Per source details. Do not edit below this line.=-
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:
{
"iocs": {
"domains": [
"ipcheck-hashed.vercel.app"
],
"urls": [
"https://ipcheck-hashed.vercel.app/api/auth/f1f097d93c318c92f0c5"
]
},
"malicious-packages-origins": [
{
"import_time": "2026-05-13T21:58:23.764687477Z",
"modified_time": "2026-05-13T12:01:29Z",
"sha256": "37a9993551389729247a4d3b88747296e12dc861db457d83581f0e60cd4d0c30",
"source": "ossf-package-analysis",
"versions": [
"1.0.0"
]
},
{
"id": "IN-MAL-2026-002819",
"import_time": "2026-05-15T07:37:20.952322779Z",
"modified_time": "2026-05-15T03:21:38Z",
"sha256": "bb86c79e7ed3cd429c0f28bc08e00ce020df2ec42fdda086ad8bfca99f259930",
"source": "amazon-inspector",
"versions": [
"1.0.0"
]
},
{
"id": "IN-MAL-2026-002736",
"import_time": "2026-05-15T07:37:18.7260115Z",
"modified_time": "2026-05-14T19:25:34Z",
"sha256": "fab375c953441e530540f01ba02981bb29edb746fdecc608249c7bc314ca39a3",
"source": "amazon-inspector",
"versions": [
"1.0.0"
]
},
{
"id": "IN-MAL-2026-020260",
"import_time": "2026-09-21T17:14:24.326424419Z",
"modified_time": "2026-09-21T16:41:49Z",
"sha256": "49b411155fbd4a47dc85a1fcc39f3b33ae1d9a3b0e8e171f24973c2438fc8762",
"source": "amazon-inspector",
"versions": [
"2.1.2"
]
}
]
}[
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
]
{
"evidence_files": [
{
"path": "package.json",
"sha256": "ad71655f86483901c57b0116c7b3369d6e47b63b0ef327961b5547e7fb405fc0",
"tlsh": "d4f0ab64af106af328c04e530a1b49cb64b3ca1f08287c68b39ba45d039c7eb15fb55e"
},
{
"path": "index.js",
"sha256": "8c392403f10df44e70244d14aa135cb572886ab4fb693af581c580207d943ae7",
"tlsh": "bc900205816571811315c657a74960831bd4c394c55040a04744495d4016e4450b65d0"
},
{
"path": "index.js",
"sha256": "2956b023858d706a5e241cd28b845088e5f414c5f70bd5d8cb73cb427d081065"
},
{
"path": "lib/caller.js",
"sha256": "a559a29ace0ce45b0d3741ffe567b3968df2973ff02480c7864c18cb6a53ae49"
},
{
"path": "lib/const.js",
"sha256": "951722c5567e04de8641a4ec35f6824bcd0feb8d72f6b7476827ac063d3eec7b"
}
],
"package_integrity": [
{
"filename": "hardhat-core-1.0.0.tgz",
"hashes": {
"sha1": "7c766e1037afdf633f137c0688cff9e75dd22aae",
"sha512_sri": "sha512-jxPOG6m+gbRmsfDHuNq0cOwFIRcPFTqpUA0tEe1GjiiLBjpPYXMN/ge+KumOhXZTg380FrkWYG1h7Fa5F+gM2g=="
}
},
{
"filename": "hardhat-core-2.1.2.tgz",
"hashes": {
"sha1": "fffa34e4d0c454f0f3a182eacf2c582aa1769c8a",
"sha512_sri": "sha512-bqJAw7gtYj8bLH30uxQffOpQuicNNMWOauhJ/i/i2l/0Wc2Gputewu1GbnAV05qK6Dlahq9Tq3xQEP/SccK1jw=="
}
}
]
}
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-core/MAL-2026-3713.json"