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

目标: 1000 元 · 已筹: 1336

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

ts-vitest

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

Summary

Malicious code in ts-vitest (npm)

凭据/密钥窃取安装阶段执行
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
362
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
永久样本归档NAS
版本状态大小SHA-256获取方式
1.0.7unavailable
1.0.8unavailable
1.0.9unavailable
1.1.0unavailable
1.1.1unavailable
1.1.2unavailable
1.1.3unavailable
样本保存在内网 NAS 隔离区,不公开镜像地址;已开通会员可直接从平台下载。同步任务不会解压或执行样本。
受影响版本
EcosystemPackageVersion
npmts-vitest*
npmts-vitest1.0.7
npmts-vitest1.0.8
npmts-vitest1.0.9
npmts-vitest1.1.0
npmts-vitest1.1.1
npmts-vitest1.1.2
npmts-vitest1.1.3
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-10990","published":"2026-07-21T00:00:00Z","modified":"2026-08-25T16:28:08.650137359Z","aliases":["GHSA-2g3m-3343-pgvq"],"summary":"Malicious code in ts-vitest (npm)","details":"ts-vitest is a typosquat of vitest/ts-eslint (hollow \"kelly-calc\"/\"clob-math\" content, no legitimate functionality) that ships a postinstall two-stage fetch-exec dropper. The package.json declares `postinstall: node scripts/install-check.cjs`; the hook's `resolvePeerBundleUrl()` fetches a JSON config from a hardcoded, typosquatting host (`https://ts-eslint.vercel.app/config/clob-math.json`, also the package.json homepage), reads a second-stage tarball URL out of that config, npm installs the tarball, then `require()`s and executes it — achieving install-time RCE before any package code is used. The config JSON resolves to a second-stage tarball at `https://ts-eslint.vercel.app/releases/psm-peer.tgz`, whose `main` entry point is `peer-math.js`. The config indirection (an ephemeral *.vercel.app host serving JSON that points at the real payload) keeps the tarball URL out of the package bytes, defeating a naive grep for a hardcoded payload URL.\n\nThe lineage alternates malicious and clean releases: 1.1.1 shipped the dropper (previously convicted), 1.1.2 removed the postinstall hook as a clean decoy, and 1.1.3 restores a byte-identical copy of the 1.1.1 dropper. The hook is entirely YARA-invisible (0 matches); detection required reading the hook's logic directly rather than relying on signature scoring. Published by sole npm maintainer `naradi` (maintainer email `les.t.e.rbigs.antos@gmail.com`), who pushed 7 versions in ~6.5 hours.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (082ff0d6388a0e04c300f34025d389e37e4378fd863105399c10d1395294e657)\nThe package is published as `ts-vitest` and its README advertises a TypeScript/Jest transformer, but the shipped code is unrelated (a Kelly-stake helper) and the postinstall hook performs install-time remote code execution. On `npm install`, the postinstall resolves a bundle URL from a JSON config at `https://ts-eslint.vercel.app/config/clob-math.json` (a lookalike of the legitimate `typescript-eslint` project), downloads the returned `.tgz` archive, extracts it, runs `npm install` inside the extracted directory, then `require`s `peer-math.js` and invokes `syncSession()` in the installer's Node process. There is no version pin, no hash or signature check, and the config host is author-controlled and mutable, so the executed payload can be changed at any time. The name/README cover story combined with the typosquat-style config domain is a deliberate dropper shape.\n\n## Source: ghsa-malware (122dc63f875d72ec5998d5f1f34e84dfa1e49dd17ba586852e8961aff09a2739)\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":"ts-vitest","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.1.1","1.1.3","1.0.8","1.1.2","1.1.0","1.0.9","1.0.7"],"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"},{"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":"scripts/install-check.cjs","sha256":"41d2656dc9508eb4f36abead0e471b0a1157342d52e520e736fb183759f60f5e","tlsh":"cf91359519a2727746b1ebb8c722d02dfe2340233521c350f6de96952fb72a4c352dec"},{"path":"package.json","sha256":"c71bd7679f8168eaa3fb6d20836c9af4e67ce8ac90af32ec250f467775289561","tlsh":"61f08137eb91dd3718f88e694d595904f1698b1f62b04c17b1b7a01c4fb1263045f739"}],"package_integrity":[{"filename":"ts-vitest-1.1.1.tgz","hashes":{"sha1":"841e9b75099068f300d4817e702dfacc7aefbe28","sha512_sri":"sha512-u2i7KxIxbQHAODnk/KZ0Ksdb8gXwnznmE7E2sPWG2F1y3pVLYzOc11VVLcm7YRS0q2Be2QqlrgidOQ5Ng413Mg=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.1.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.1.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.0.8"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.1.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.0.9"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/ts-vitest/v/1.0.7"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-2g3m-3343-pgvq"}],"database_specific":{"iocs":{"domains":["ts-eslint.vercel.app"],"urls":["https://ts-eslint.vercel.app/config/clob-math.json","https://ts-eslint.vercel.app/releases/psm-peer.tgz"]},"malicious-packages-origins":[{"id":"IN-MAL-2026-011080","import_time":"2026-08-04T21:33:16.167187802Z","modified_time":"2026-08-04T21:29:38Z","sha256":"f24679cb79843cdc1518d4f7317488da41656fd6f6351984115b77f40a4a74fd","source":"amazon-inspector","versions":["1.1.1"]},{"id":"IN-MAL-2026-011160","import_time":"2026-08-04T22:30:02.465778114Z","modified_time":"2026-08-04T21:41:11Z","sha256":"082ff0d6388a0e04c300f34025d389e37e4378fd863105399c10d1395294e657","source":"amazon-inspector","versions":["1.1.3"]},{"id":"IN-MAL-2026-013213","import_time":"2026-08-05T06:00:54.629511448Z","modified_time":"2026-08-05T05:50:24Z","sha256":"628bf106e7eeb415ef6d10c5fcb29488e742a609ef12cd70eeeac73b41ba4ecd","source":"amazon-inspector","versions":["1.0.8"]},{"id":"IN-MAL-2026-013212","import_time":"2026-08-05T06:00:54.455199759Z","modified_time":"2026-08-05T05:50:17Z","sha256":"92b1499b1653081db9e37fe4140b3af0531e72093cc9e9c485dd87cb87779b6d","source":"amazon-inspector","versions":["1.1.2"]},{"id":"IN-MAL-2026-013210","import_time":"2026-08-05T06:00:54.267112113Z","modified_time":"2026-08-05T05:49:55Z","sha256":"bc0206750931e3ddd0220d914c10f41c84e2ab4b5a220dd03319fa5fc6cb8549","source":"amazon-inspector","versions":["1.1.0"]},{"id":"IN-MAL-2026-013211","import_time":"2026-08-05T06:00:54.359275567Z","modified_time":"2026-08-05T05:50:04Z","sha256":"e07022785602f148823f437ff2908eab5dfb32bce969e70238068866ce744fd4","source":"amazon-inspector","versions":["1.0.9"]},{"id":"IN-MAL-2026-013306","import_time":"2026-08-05T07:06:40.550784709Z","modified_time":"2026-08-05T06:04:20Z","sha256":"5c95b17b37ca7a1614da2f77567b363ae0f689bd9421d655f883859527acc177","source":"amazon-inspector","versions":["1.0.7"]},{"id":"GHSA-2g3m-3343-pgvq","import_time":"2026-08-25T16:26:04.989467695Z","modified_time":"2026-08-25T16:19:29Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"122dc63f875d72ec5998d5f1f34e84dfa1e49dd17ba586852e8961aff09a2739","source":"ghsa-malware"}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"SafeDep","contact":["https://safedep.io"],"type":"FINDER"}]}

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