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

目标: 1000 元 · 已筹: 1336

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

twapfetch

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

Summary

Malicious code in twapfetch (npm)

安装阶段执行
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
430
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmtwapfetch1.1.0
npmtwapfetch1.1.1
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-08-19T01:36:50Z","published":"2026-08-19T01:16:39Z","schema_version":"1.7.4","id":"MAL-2026-14197","summary":"Malicious code in twapfetch (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (c319f6606c9407d69fa80de43ddc3b133cba284d9356a27cc12d37b3de036b3f)\ntwapfetch@1.1.0 ships a postinstall script (scripts/install-check.cjs) that, on `npm install`, resolves a tarball URL from environment variables (PSM_PEER_URL, PSM_SYNC_CONFIG, KELLY_PEER_CONFIG) or from package.json's homepage field, downloads a.tgz to a local.peer/ directory, runs `npm install` inside the extracted directory, then require()s peer-math.js from it and invokes syncSession(). The fetched bundle URL is mutable and author-controlled; there is no version pin, no hash check, and no signature verification, so arbitrary code chosen by the maintainer (or anyone who alters the resolved URL) executes on the installer's machine at install time. The advertised purpose (a Polymarket Chainlink TWAP WebSocket client documented in the README as TwapClient / fetchTwapOnce against wss://ws-live-data.polymarket.com) is not present in the shipped code: the main entry only exports Kelly-stake math helpers (computeKellyStake, formatStakeUsd, roundStake), and the postinstall's remote-bundle loader has no relationship to any TWAP functionality. The mismatch between advertised purpose and shipped behavior is the cover-story shape typical of install-time droppers.\n","affected":[{"package":{"ecosystem":"npm","name":"twapfetch"},"versions":["1.1.0","1.1.1"],"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"}],"indicators":{"evidence_files":[{"path":"scripts/install-check.cjs","sha256":"3e15f1692c4075cf29cefa94c84d564a95086ab7a6838a97ea25cd02475a282d","tlsh":"6ad1659915a272770bb0e7a4cb53a41eeb6394233511c364f6cdc6952ff6164c213dec"},{"path":"package.json","sha256":"2dcdd0629cd8daa8083206b72f279737fb9e67501bbcf1dc7956b37f6ed54f76","tlsh":"9401f737c9604e7729bcdb9879255204f4550b2f31609c4bb1fb812ccfa21a3045fb29"}],"package_integrity":[{"filename":"twapfetch-1.1.0.tgz","hashes":{"sha1":"75d7dd111eb9a43670137345b7252d8bf7c40264","sha512_sri":"sha512-tLaAvh3eU6XHGNJQGcFEEdKp8fcwDpqfXUqiegGYDtyAfSOuA3xjqS+sCM+lT8MbUPqWAfHJIs7jlSQMvaF2vQ=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/twapfetch/v/1.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/twapfetch/v/1.1.1"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-018273","import_time":"2026-08-19T01:34:41.350212621Z","modified_time":"2026-08-19T01:16:48Z","sha256":"c319f6606c9407d69fa80de43ddc3b133cba284d9356a27cc12d37b3de036b3f","source":"amazon-inspector","versions":["1.1.0"]},{"id":"IN-MAL-2026-018272","import_time":"2026-08-19T01:34:41.264462275Z","modified_time":"2026-08-19T01:16:39Z","sha256":"e1c2918d6e515591732bb1841e9c4e4fde77dea9b7507e3bd0704458ea42f64c","source":"amazon-inspector","versions":["1.1.1"]}]}}

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