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

目标: 1000 元 · 已筹: 1359 元

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

@bcryptln/becryptjs

MAL-2026-10162
2026-08-05 06:02:51
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in @bcryptln/becryptjs (npm)

凭据/密钥窃取
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
161
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npm@bcryptln/becryptjs*
npm@bcryptln/becryptjs3.0.10
npm@bcryptln/becryptjs3.0.11
npm@bcryptln/becryptjs3.0.8
npm@bcryptln/becryptjs3.0.9
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-10162","published":"2026-07-10T17:16:37Z","modified":"2026-08-05T06:02:51.206473868Z","aliases":["GHSA-9qhg-2wvw-j95c"],"summary":"Malicious code in @bcryptln/becryptjs (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (cb86f48a4b796f17dc1017a92153b88afce1f15690687eaa422162d9dd9f347d)\nPackage @bcryptln/becryptjs impersonates the widely-used bcryptjs library (its own metadata still references the upstream dcodeIO/bcrypt.js project). The ESM entrypoint index.js contains a legitimate copy of bcryptjs followed by whitespace padding and an appended obfuscated block that runs unconditionally when a consumer does `import '@bcryptln/becryptjs'`. The trailing code hoists `require`, `module`, `__dirname`, and `__filename` onto globals, then uses two custom positional string-shuffle decoders with hardcoded numeric seeds to derive the identifier `Function`, constructs a runtime function from a decoded string, and invokes it. Because `require` is re-exposed to the constructed function, the payload has full CommonJS reach (fs, child_process, http, net) from within an ESM module. The CommonJS/UMD entrypoint (umd/index.js) is a clean copy of upstream with no payload — the malicious code is placed only on the `import` conditional export, targeting modern ESM consumers while keeping the `require` path benign to defeat diff-against-upstream review. The combination of name impersonation, hidden payload appended after whitespace padding, custom string-shuffle obfuscation whose only purpose is to hide `Function` and the payload body, dynamic code construction with re-exposed CommonJS primitives, and UMD/ESM split are jointly consistent with an intentional supply-chain trojan.\n\n## Source: ghsa-malware (c147d5e0e65933eb8e957318dd7634d8f75812df1da9e4f51200b11e7845edf3)\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":{"name":"@bcryptln/becryptjs","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["3.0.8","3.0.10","3.0.11","3.0.9"],"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"}],"indicators":{"evidence_files":[{"path":"package.json","sha256":"1e790d92714abbcfcf34440af9b126a471d2c52a325edd77baeeaf7821c18986","tlsh":"e9419961ccb08da30bd819d1f8399a12b271495b8c24bd16779e912c8f4e0ef15fe29e"},{"path":"umd/index.js","sha256":"6a04e75ccbd3f5d622ca2a4dc4df6eeb514e0eef67372bf7bd36bdc1e7e38534","tlsh":"563309840ba721710923b93a572f9485b6b9a1370628fd55bc5c67b09fbf32cd2f1d88"}],"package_integrity":[{"filename":"becryptjs-3.0.8.tgz","hashes":{"sha1":"f13e2a34533370ae2bf2c338e51de7ef7d76968c","sha512_sri":"sha512-aE2vcrmfgSkpno/ZP0xmT2RT+hyGDP57pkWa48bL9sZY/Dx+Ps9BJlAyq9onLX5CaemH3ZzV9lfxhnuOUVlxHg=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@bcryptln/becryptjs/v/3.0.8"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@bcryptln/becryptjs/v/3.0.10"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@bcryptln/becryptjs/v/3.0.11"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-9qhg-2wvw-j95c"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@bcryptln/becryptjs/v/3.0.9"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-009688","import_time":"2026-07-10T18:05:59.568023453Z","modified_time":"2026-07-10T17:16:53Z","sha256":"187a8bc42e0b5b2b84a05196bf192df5cea272412f0f6c3dfb033e7a84efd12d","source":"amazon-inspector","versions":["3.0.8"]},{"id":"IN-MAL-2026-009686","import_time":"2026-07-10T18:05:59.424757414Z","modified_time":"2026-07-10T17:16:37Z","sha256":"cb86f48a4b796f17dc1017a92153b88afce1f15690687eaa422162d9dd9f347d","source":"amazon-inspector","versions":["3.0.10"]},{"id":"IN-MAL-2026-009687","import_time":"2026-07-10T18:05:59.493461351Z","modified_time":"2026-07-10T17:16:45Z","sha256":"dc61cae0736f2880d659ccadc0e57f0a6b555799721b71af48b68510c217f030","source":"amazon-inspector","versions":["3.0.11"]},{"id":"GHSA-9qhg-2wvw-j95c","import_time":"2026-07-23T07:45:08.423779877Z","modified_time":"2026-07-23T00:59:26Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"c147d5e0e65933eb8e957318dd7634d8f75812df1da9e4f51200b11e7845edf3","source":"ghsa-malware"},{"id":"IN-MAL-2026-012997","import_time":"2026-08-05T06:00:29.083549234Z","modified_time":"2026-08-05T05:19:10Z","sha256":"f8244513bd8790426bdf57be4fff97c078cef67ddbfe3bd10c0f794ac51a6ce0","source":"amazon-inspector","versions":["3.0.9"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}

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