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

目标: 1000 元 · 已筹: 1359 元

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

vitest-agent

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

Summary

Malicious code in vitest-agent (npm)

凭据/密钥窃取安装阶段执行
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
6
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmvitest-agent*
npmvitest-agent1.0.0
npmvitest-agent1.0.5
npmvitest-agent1.0.6
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-08T22:53:39Z","published":"2026-07-01T19:15:53Z","schema_version":"1.7.4","id":"MAL-2026-6710","aliases":["GHSA-w2r4-4x6j-3h5x"],"summary":"Malicious code in vitest-agent (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6e0165cbb3d6ed37a96889c4b016463706346e1c09413635c31ea1ceedde8774)\nThe package's postinstall script (`node lib/utils/index.js`) spawns a detached, stdio-suppressed Node child process that runs `lib/utils/smtp-connection/index.js`. That file fetches JavaScript from `https://jsonkeeper.com/b/WDH3V` via axios and executes the response with `new Function(\"require\", r.data.cookie)(require)`, running unpinned, mutable, non-publisher code on the installer's machine at `npm install` time. The package is named `vitest-agent` but its `main` and shipped source are a verbatim copy of nodemailer (author field `Andris Reinman`, description is an unrelated React copyright string), a name/identity mismatch consistent with a lure targeting vitest ecosystem users. Concealment signals reinforce the dropper: a ~256 KB `LICENSE` file sits adjacent to a 185-byte dropper `index.js` under `lib/utils/smtp-connection/`, and path names mirror legitimate nodemailer layout as cover. Because the harmful code path fires automatically from the postinstall lifecycle hook, installers are compromised without any explicit user action beyond installing the package.\n\n## Source: ghsa-malware (c760a9cc4fdf3746f5c3ea670a49bc3441556a64a1fe3c97314375d427d7f1d4)\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-agent"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.6","1.0.5","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"}],"indicators":{"evidence_files":[{"path":"lib/utils/smtp-connection/index.js","sha256":"27bc8017644a3295d5d410ca6c8159d666a2ed002103b49f3afbaee13d35f487","tlsh":"89c0225633c8201e202210e2530e10107013c8324d46c45da2040afa14e1a860a22ea4"},{"path":"package.json","sha256":"2c03e07e921ee3e9230194af7b49defa2bec962e60a0eb1ea42c7ff404e9f228","tlsh":"d0416526cd678df3229926ed78685182b460d00fcc0ab85d774d138c8f8e99f3678a6d"}],"package_integrity":[{"filename":"vitest-agent-1.0.6.tgz","hashes":{"sha1":"7c050744bbac52370c19b54d339cedb43537c7ff","sha512_sri":"sha512-rKLI+8GqzL9A9D/ZR8hjCdVfqYjL5BiDpV1DbO32vHnDNK7zwHv0645d8B3GEmdox3C5MGDEdkSZU/GwaJHnmg=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-agent/v/1.0.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-agent/v/1.0.5"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-w2r4-4x6j-3h5x"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vitest-agent/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"6e0165cbb3d6ed37a96889c4b016463706346e1c09413635c31ea1ceedde8774","import_time":"2026-07-01T20:12:12.361263503Z","id":"IN-MAL-2026-007874","modified_time":"2026-07-01T19:16:03Z","versions":["1.0.6"]},{"source":"amazon-inspector","sha256":"c3f7ebf642b562d3c33e78df9352951379038121536b34dc0a358e3dc5a6343e","import_time":"2026-07-01T20:12:12.308262705Z","id":"IN-MAL-2026-007873","modified_time":"2026-07-01T19:15:53Z","versions":["1.0.5"]},{"source":"ghsa-malware","sha256":"c760a9cc4fdf3746f5c3ea670a49bc3441556a64a1fe3c97314375d427d7f1d4","import_time":"2026-07-02T11:08:17.649278488Z","id":"GHSA-w2r4-4x6j-3h5x","modified_time":"2026-07-02T09:48:12Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"amazon-inspector","sha256":"c7ddfe92ed153b480331ceded0c3d17e3059b5fa4ae65c6647952083ff10e239","import_time":"2026-07-08T22:51:23.446131143Z","id":"IN-MAL-2026-008815","modified_time":"2026-07-08T22:37:09Z","versions":["1.0.0"]}]}}

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