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

目标: 1000 元 · 已筹: 1359 元

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

chai-web3-testkit

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

Summary

Malicious code in chai-web3-testkit (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
2
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-web3-testkit*
npmchai-web3-testkit1.0.1
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-20T13:16:55Z","published":"2026-06-12T16:11:50Z","schema_version":"1.7.4","id":"MAL-2026-5699","aliases":["GHSA-j8qr-4p5h-mwqj"],"summary":"Malicious code in chai-web3-testkit (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (ecc1472c1964a224051ad01d14dabfdfd3ca26d594fff02fb07192f423238691)\nThe package advertises itself as a Web3.js testing toolkit but its content is copied from the legitimate chai-smart-assert library and a malicious dropper has been added. The main export `chaiPlugin` (src/index.js:227-234) silently spawns a detached, unref'd `node` child process pointing at src/utils/swap.js with stdio set to 'ignore', hiding all output. swap.js (lines 21-23) then fetches arbitrary JavaScript from https://www.jsonkeeper.com/b/AAON3 over axios with a custom `x-secret-key` header, retries 5x, and feeds the response body into `new Function.constructor('require', s)` invoked with the real Node `require` — full remote code execution on the consumer. The hardcoded C2 URL is disguised by shadowing the real `process` object with a fake `process.env` containing `DEV_API_KEY`/`DEV_SECRET_KEY`/`DEV_SECRET_VALUE` (swap.js:4-10), and console.log is locally rebound to suppress output after exec — cover-story obfuscation consistent with intentional malicious behavior, not a mistake. Repository URL github.com/uhop/chai-web3-testkit does not exist; the package name and description impersonate both the chai ecosystem and the uhop maintainer namespace. Any consumer who imports and calls the documented main export is silently compromised with attacker-mutable code running under full Node privileges.\n\n## Source: ghsa-malware (08ecedb36b3feee0b20984ec8e0da248a8182e27d55eb1ed6fbcfdd26e7f325c)\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":"chai-web3-testkit"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.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":"src/utils/swap.js","sha256":"e985d5998e9ef8a84638f0b294bd8d9d239ed275760ac20b4713efc3badab450","tlsh":"4101dc8f60ac540c047013e2bb1be032f522b4aa340281c0335c82421f7689d6103ede"},{"path":"src/index.js","sha256":"7f6c9484a7c09bd6589cdb9d0578fe996dd9840820e98da55129a9315d8610f9","tlsh":"6502648958fb30160653e1f4614f850e6feac423284da9b0b19cdeb06f8615c5ab6fe9"},{"path":"package.json","sha256":"f2944fcdd5f1f5bfc9b03855743eca107fcab26ba5afc3658ffc3ea8df89829c","tlsh":"7c41bc31d4725ca306c51515e9ad1a17a2a184afcf44fd4ab782029ccf8e46f94bd32f"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-j8qr-4p5h-mwqj"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-web3-testkit/v/1.0.1"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]},{"name":"ReversingLabs","type":"FINDER","contact":["https://www.reversinglabs.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"ghsa-malware","sha256":"08ecedb36b3feee0b20984ec8e0da248a8182e27d55eb1ed6fbcfdd26e7f325c","import_time":"2026-06-12T17:16:21.763237311Z","id":"GHSA-j8qr-4p5h-mwqj","modified_time":"2026-06-12T16:11:55Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"amazon-inspector","sha256":"ecc1472c1964a224051ad01d14dabfdfd3ca26d594fff02fb07192f423238691","import_time":"2026-06-15T20:14:27.510305021Z","id":"IN-MAL-2026-006684","modified_time":"2026-06-15T19:48:57Z","versions":["1.0.1"]},{"source":"reversing-labs","sha256":"bab1398f9a9d9834dddfb9dae8d1ac008eabb9c61a03681168990bac2d527808","import_time":"2026-07-20T13:14:44.68616648Z","id":"RLMA-2026-05513","modified_time":"2026-07-20T10:37:09Z","versions":["1.0.1"]}]}}

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