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

目标: 1000 元 · 已筹: 1359 元

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

hardhat-roof

MAL-2026-17509
2026-10-04 23:28:31
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in hardhat-roof (npm)

AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
0
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmhardhat-roof2.21.0
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-10-04T23:28:31Z","published":"2026-10-04T23:28:31Z","schema_version":"1.7.4","id":"MAL-2026-17509","summary":"Malicious code in hardhat-roof (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (25cbf03ad6014824ab078237f83b2b682145928e5effefbe3dcc5deca9ba1e26)\nThe package presents itself as the pino logger — README, docs/, index.d.ts and LICENSE are copied from pinojs/pino and keywords advertise 'fast, logger, stream, json' — but the package name is 'hardhat-roof', the description references unrelated vulnerability-management functionality, and the author points to jsonspack.com rather than the pino maintainers. The top of index.js executes `require('./lib/config')`, which loads lib/config.js: a 4,373,384-byte file containing obfuscator.io-style string-array obfuscation with a self-rotating decoder (`n['push'](n['shift']())` loop gated by a parseInt sum), hex-escaped character lookups, and dozens of single-letter indirection functions. The remaining lib/ files are small and consistent with pino; only config.js is the oversized opaque blob, and the real pino has no such file. Any consumer that imports or requires this package therefore executes several megabytes of opaque code in-process at load time. The combination of a doppelganger cover story cloned from a popular logger, a mismatched package name and author, and a reachable load-time execution path into a heavily obfuscated multi-megabyte payload is the shape of a trojanized typosquat/doppelganger delivering attacker-controlled code into installer processes.\n","affected":[{"package":{"ecosystem":"npm","name":"hardhat-roof"},"versions":["2.21.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"lib/config.js","sha256":"7e4c6d76f1d845f752e37876a2d3f773996719f33c2d1c282e0a84b04444efeb","tlsh":"bf1694889194e02b96df1753bf052afdd13aa876d0cca747c2d4be9d29ac80be475cd0"},{"path":"package.json","sha256":"d3bb5cea03caac3a23bcdffc83163c1663498d2c0a1c995441011e285cc45e8a","tlsh":"2b017620deb88e2301ed25524c2a0643b6a28c575528fc2932dba12c0f9d5ff01ff21d"}],"package_integrity":[{"filename":"hardhat-roof-2.21.0.tgz","hashes":{"sha1":"7ce872cf9079e7cec42c9b198d8a0e7215c7a9d8","sha512_sri":"sha512-9DlOXdeTUrWcsIBZeEvWbdoy0jLPQ12zYlRuzjXbEwmOrmZmiUMk/azE6prL9nismvmy+vrLEBD+MhMDJCKhBg=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-roof/v/2.21.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-020974","import_time":"2026-10-04T23:40:47.446760876Z","modified_time":"2026-10-04T23:28:31Z","sha256":"25cbf03ad6014824ab078237f83b2b682145928e5effefbe3dcc5deca9ba1e26","source":"amazon-inspector","versions":["2.21.0"]}]}}

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