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

目标: 1000 元 · 已筹: 1359 元

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

vite-plugin-crypto

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

Summary

Malicious code in vite-plugin-crypto (npm)

凭据/密钥窃取
AI 分析整理claude-sonnet-4-6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
778
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmvite-plugin-crypto*
npmvite-plugin-crypto1.0.0
npmvite-plugin-crypto1.0.1
npmvite-plugin-crypto1.0.2
npmvite-plugin-crypto1.0.5
npmvite-plugin-crypto1.0.6
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-17222","published":"2026-09-28T16:03:22Z","modified":"2026-09-30T00:54:52.169699938Z","aliases":["GHSA-mh9w-qr45-6wrq"],"summary":"Malicious code in vite-plugin-crypto (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (54ee82c069dcdf259199f5844c6ff46be3020d79609ff7b7b8ebc82017c59b2c)\nvite-plugin-crypto@1.0.2 exposes a Vite plugin factory whose body concatenates three option fields — `secret`, `salt`, and `iv` — into a single string and passes it to `System.import(...)` from the `systemjs` runtime module loader, discarding the returned promise with `.then(() => {})`. Only `secret` is used by the advertised AES-GCM `encrypt()` path; `salt` and `iv` are declared on the options type but are absent from the documented options table and are unused by the real crypto code (which generates its own random salt/IV per call). The concatenated string is treated as a module specifier by SystemJS, which resolves URLs and executes fetched JavaScript, so whoever controls these option values obtains arbitrary JavaScript execution on the Vite build/dev host each time the config is loaded. Pulling in a browser-oriented dynamic module loader as the package's only runtime dependency, naming the concatenated input `derivedSecret`, and swallowing the promise frame the remote-loader call as a benign key-derivation step. Base64 decoding in dist/index.cjs and dist/index.js is used within the AES-GCM helper. The trigger fires at plugin construction during `vite build` / `vite dev`.\n\n## Source: ghsa-malware (fdaf333e613f70df12ceaf378093d996a4bc1dd4df1a6350c4848a5de0fb83e7)\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":"vite-plugin-crypto","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.2","1.0.6","1.0.5","1.0.1","1.0.0"],"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":"dist/index.cjs","sha256":"e6ec0ae5781f3e77f3ea1f947e255c960bcb384c826a1d2d7626b7c8d0e7adfe","tlsh":"be0274477df6546187b3b0a7b53fe9423638a5063400cb78bb6c87948f854a8d1b29ed"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-mh9w-qr45-6wrq"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-crypto/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-crypto/v/1.0.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-crypto/v/1.0.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-crypto/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-crypto/v/1.0.0"}],"database_specific":{"malicious-packages-origins":[{"id":"GHSA-mh9w-qr45-6wrq","import_time":"2026-09-28T16:31:02.117909728Z","modified_time":"2026-09-28T16:03:22Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"fdaf333e613f70df12ceaf378093d996a4bc1dd4df1a6350c4848a5de0fb83e7","source":"ghsa-malware"},{"id":"IN-MAL-2026-020603","import_time":"2026-09-28T18:24:39.843136221Z","modified_time":"2026-09-28T18:07:11Z","sha256":"54ee82c069dcdf259199f5844c6ff46be3020d79609ff7b7b8ebc82017c59b2c","source":"amazon-inspector","versions":["1.0.2"]},{"id":"IN-MAL-2026-020596","import_time":"2026-09-28T18:24:39.042858675Z","modified_time":"2026-09-28T18:06:03Z","sha256":"991fcc5c93cbfa1b4414004314032fdc2cc976c9461923b3872d424f560323d5","source":"amazon-inspector","versions":["1.0.6"]},{"id":"IN-MAL-2026-020597","import_time":"2026-09-28T18:24:39.137871442Z","modified_time":"2026-09-28T18:06:14Z","sha256":"ed699d91a10f9a0478d9db02fc5c2716985435ee3ebc3be0cb3d45863e36462a","source":"amazon-inspector","versions":["1.0.5"]},{"id":"IN-MAL-2026-020706","import_time":"2026-09-30T00:52:50.816483887Z","modified_time":"2026-09-30T00:24:49Z","sha256":"045d711b35221e081b21788c57ee2fae74b06d15f9801674c82f3901a6c59bf1","source":"amazon-inspector","versions":["1.0.1"]},{"id":"IN-MAL-2026-020705","import_time":"2026-09-30T00:52:50.727547448Z","modified_time":"2026-09-30T00:24:39Z","sha256":"ca3290574635349dd579841116cda38878885e7d211ae6078702369bd3fd15e8","source":"amazon-inspector","versions":["1.0.0"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}

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