目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%
← 返回恶意软件包
npm active

hardhat-core

MAL-2026-3713
2026-09-21 17:15:54
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in hardhat-core (npm)

文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
—
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmhardhat-core1.0.0
npmhardhat-core2.1.2
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-3713","published":"2026-05-13T12:01:29Z","modified":"2026-09-21T17:15:53.793430927Z","summary":"Malicious code in hardhat-core (npm)","details":"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.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (49b411155fbd4a47dc85a1fcc39f3b33ae1d9a3b0e8e171f24973c2438fc8762)\nThe 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.\n\n## Source: ossf-package-analysis (37a9993551389729247a4d3b88747296e12dc861db457d83581f0e60cd4d0c30)\nThe OpenSSF Package Analysis project identified 'hardhat-core' @ 1.0.0 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package executes one or more commands associated with malicious behavior.\n","affected":[{"package":{"name":"hardhat-core","ecosystem":"npm"},"versions":["1.0.0","2.1.2"],"database_specific":{"cwes":[{"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"}],"indicators":{"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=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-core/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-core/v/2.1.2"}],"database_specific":{"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"]}]},"credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com","inspector-research@amazon.com"],"type":"FINDER"},{"name":"ESTsecurity","type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}

数据来源:OpenSSF Malicious Packages · Apache-2.0