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

目标: 1000 元 · 已筹: 1359 元

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

mongoose-lean-hooks

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

Summary

Malicious code in mongoose-lean-hooks (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
3
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmmongoose-lean-hooks*
npmmongoose-lean-hooks0.5.2
npmmongoose-lean-hooks0.5.3
npmmongoose-lean-hooks0.5.4
npmmongoose-lean-hooks0.5.5
npmmongoose-lean-hooks0.5.6
npmmongoose-lean-hooks0.5.7
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-09T17:21:23Z","published":"2026-07-06T18:01:34Z","schema_version":"1.7.4","id":"MAL-2026-6797","aliases":["GHSA-98h3-p825-wwhh"],"summary":"Malicious code in mongoose-lean-hooks (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (540ace1cb8bc936ea953554a9ffc28203370f82cb5e5a7dfbf1454bf0e834b9a)\nOn `require('mongoose-lean-hooks')`, the package's main entry (index.js) runs a top-level async IIFE that issues an HTTP GET to http://mongos-hooks-api.vercel.app/defy/v3 with a bearer-style header. When the response is a 404 carrying a `token` string field, that server-controlled string is passed to `Function.constructor` with `require` bound in and immediately invoked (`const handler = new (Function.constructor)(\"require\", res.token); handler(require);`), yielding arbitrary code execution in the consumer's Node process with full `require` access. The endpoint, path, and header token are hidden in test/config_test.js under a `module.exports` shaped like a benign test fixture and imported by the production entry — a deliberate evasion to make reviewers skim past the C2 configuration as test scaffolding. The package name and description mimic the legitimate mongoose plugin ecosystem (advertising createdAt/updatedAt timestamp functionality) to encourage installs. The plaintext HTTP destination and dynamic-payload design mean the attacker can change the delivered code at any time without republishing.\n\n## Source: ghsa-malware (51f21ca8cb459221a26134e631f974e5a26cb292386a957c75da31b538119c61)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","affected":[{"package":{"ecosystem":"npm","name":"mongoose-lean-hooks"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["0.5.3","0.5.2","0.5.4","0.5.5","0.5.7","0.5.6"],"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"},{"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":"index.js","sha256":"384918838cd2130c625021673c2fd038d1254f85fdfee8009231781f7c0b41f3","tlsh":"ac61aa7865bad601a53332f18cf61246dab5c037054a90d9fcaec2d4ab30814196fff8"},{"path":"package.json","sha256":"7cb09f741960b458ece3cb67485ec522caeeabe091da8133f9ed5b1656f8f12f","tlsh":"c8014019d834ae3b06ec70b2a8a80247ba618d0b4e44bc1c3387521c5f4c42f20bba6e"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-98h3-p825-wwhh"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mongoose-lean-hooks/v/0.5.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mongoose-lean-hooks/v/0.5.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mongoose-lean-hooks/v/0.5.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mongoose-lean-hooks/v/0.5.6"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"ghsa-malware","sha256":"51f21ca8cb459221a26134e631f974e5a26cb292386a957c75da31b538119c61","import_time":"2026-07-06T18:02:41.936554502Z","id":"GHSA-98h3-p825-wwhh","modified_time":"2026-07-06T18:01:35Z","versions":["0.5.3","0.5.2"]},{"source":"ghsa-malware","sha256":"281846a7758d7fc86b63f2753036bf6f9803f770b5c6c84614ae35ff9585114b","import_time":"2026-07-07T16:09:37.844269443Z","id":"GHSA-98h3-p825-wwhh","modified_time":"2026-07-07T15:46:11Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["0.5.3","0.5.2"]},{"source":"amazon-inspector","sha256":"ae5350443547a08bf116eb563dc3db91f4c5d1723829def5b3c4c894a919aa4d","import_time":"2026-07-09T16:20:56.392848334Z","id":"IN-MAL-2026-009272","modified_time":"2026-07-09T15:53:24Z","versions":["0.5.4"]},{"source":"amazon-inspector","sha256":"10d9262bdff06cb91509d2cc58964ae249c97f6e94bc790b42b637b015251adf","import_time":"2026-07-09T16:20:56.331292709Z","id":"IN-MAL-2026-009271","modified_time":"2026-07-09T15:53:16Z","versions":["0.5.5"]},{"source":"amazon-inspector","sha256":"540ace1cb8bc936ea953554a9ffc28203370f82cb5e5a7dfbf1454bf0e834b9a","import_time":"2026-07-09T17:19:25.058781906Z","id":"IN-MAL-2026-009331","modified_time":"2026-07-09T16:56:58Z","versions":["0.5.7"]},{"source":"amazon-inspector","sha256":"01f4ee974d2eca27a4a78c0adf2bb538f399fa0a61fe17d889d7a0786ea12192","import_time":"2026-07-09T17:19:26.362152193Z","id":"IN-MAL-2026-009340","modified_time":"2026-07-09T16:58:15Z","versions":["0.5.6"]}]}}

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