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

目标: 1000 元 · 已筹: 1359 元

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

chai-as-tokenized

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

Summary

Malicious code in chai-as-tokenized (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
4
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-as-tokenized*
npmchai-as-tokenized7.2.3
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-06-17T15:25:50Z","published":"2026-06-16T16:22:50Z","schema_version":"1.7.4","id":"MAL-2026-5902","aliases":["GHSA-4hvx-q2w4-f48v"],"summary":"Malicious code in chai-as-tokenized (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (55c10da182a0c79ca5eb0f85c6b2e334b7ee4e90946dfcc34feb44e80afa4485)\nPackage name impersonates chai-as-promised, and the README is a copy of pino's documentation, but the actual code is a remote-code-execution dropper. The exported middleware (advertised as `chai.use(chaiAsTokenized)`) spawns lib/initializeCaller.js as a detached `node` child with `stdio:'ignore'` and `child.unref()`, hiding output and surviving parent exit. The child shadows the `process` global with a fake object whose env values are base64 strings, atob-decodes them to obtain `https://amethyst-lorrin-26.tiiny.site/index.json` and the header `x-secret-key: _`, fetches JSON from that anonymous tiiny.site endpoint, and passes the response's `cookie` field to `new Function.constructor('require', response)` invoked with the live `require` — granting the remote, attacker-controlled host arbitrary code execution inside the consuming process with full module access. Combined signals: name-impersonation of a popular chai plugin, README mismatch with shipped code, base64-obfuscated C2 URL, anonymous static-file host (not a publisher domain), detached-and-silenced child spawn, and remote response evaluated as JavaScript.\n\n## Source: ghsa-malware (fe8e4af381c4b8eb3ff6a93cbd50f27cd0196c86038024c04ad803780f72cae9)\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-as-tokenized"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["7.2.3"],"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":"lib/initializeCaller.js","sha256":"2a41c6b7c5e256d70f884c613c6412ef73d86f8cd8a65afe6afb64fabaf4e022","tlsh":"f111008d61fc200c056512e6b22f18116022e4273d4ad4e47adc83470f9627fbd536df"},{"path":"package.json","sha256":"4d8216a654a4425808841d28009533a48a290c4b259186d287761d502af1ee06","tlsh":"b6019c60ce788e2300ed25825c2a064376658c135928fc1d32db512c0f9d5ff15bf21e"},{"path":"index.js","sha256":"1f51184c197102444a2c8a23e4a8e54a6479750420512922fcb5d5f795c33911","tlsh":"0f318545b5f21259126d98c4f6b4a5263cdf9437331b76b1cded93952bce2080032bc7"}],"package_integrity":[{"filename":"chai-as-tokenized-7.2.3.tgz","hashes":{"sha1":"4c64d6512b4b4d9949e47a7d9c815c4aa6cec7d3","sha512_sri":"sha512-qQbUdMoy5NuH9wMuxvFs6raZYv9aCQiFQGHMpdK+K5aCKaASuysJJrX+koLUj1RPWW2n6lzHt+HVhWMhKT4H6A=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-tokenized/v/7.2.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-4hvx-q2w4-f48v"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"55c10da182a0c79ca5eb0f85c6b2e334b7ee4e90946dfcc34feb44e80afa4485","import_time":"2026-06-16T18:10:20.637057475Z","id":"IN-MAL-2026-006793","modified_time":"2026-06-16T16:22:50Z","versions":["7.2.3"]},{"source":"ghsa-malware","sha256":"fe8e4af381c4b8eb3ff6a93cbd50f27cd0196c86038024c04ad803780f72cae9","import_time":"2026-06-17T15:23:59.027578683Z","id":"GHSA-4hvx-q2w4-f48v","modified_time":"2026-06-17T13:59:28Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}]}}

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