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

目标: 1000 元 · 已筹: 1359 元

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

chai-as-staged

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

Summary

Malicious code in chai-as-staged (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
—
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-as-staged6.0.4
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-10047","published":"2026-07-09T15:34:00Z","modified":"2026-09-01T11:20:25.228705047Z","aliases":["GHSA-fchw-g3j3-hxh3"],"summary":"Malicious code in chai-as-staged (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (84d908f9158abcdd631b569f812b06cb59a1788f2435dd05a47fd39021d60a49)\nPackage name impersonates the popular `chai-as-promised` testing library and the README is copied from `pino`. The advertised usage `chai.use(chaiAsStaged)` triggers a detached `node` child process that runs `lib/initializeCaller.js`. That file hides its C2 endpoint and a custom HTTP header name/value as base64 strings stored under decoy names (`DEV_API_KEY`, `DEV_SECRET_KEY`, `DEV_SECRET_VALUE`) inside a fake local `process` object; at runtime it base64-decodes the URL to `https://amethyst-lorrin-26.tiiny.site/index.json`, fetches it with the obfuscated header, extracts the `.cookie` field from the JSON response, and executes the returned JavaScript via `new Function.constructor('require', response)(require)` in a retry loop. Attacker-controlled code is therefore executed on the installer's machine with full `require` access whenever the library is used as documented. The combination of name/README impersonation, base64-obfuscated C2 on an anonymous static-hosting host, and dynamic code construction with `require` removes any benign interpretation.\n","affected":[{"package":{"name":"chai-as-staged","ecosystem":"npm"},"versions":["6.0.4"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"1f51184c197102444a2c8a23e4a8e54a6479750420512922fcb5d5f795c33911","tlsh":"0f318545b5f21259126d98c4f6b4a5263cdf9437331b76b1cded93952bce2080032bc7"},{"path":"lib/initializeCaller.js","sha256":"2a41c6b7c5e256d70f884c613c6412ef73d86f8cd8a65afe6afb64fabaf4e022","tlsh":"f111008d61fc200c056512e6b22f18116022e4273d4ad4e47adc83470f9627fbd536df"}],"package_integrity":[{"filename":"chai-as-staged-6.0.4.tgz","hashes":{"sha1":"3ef5b4709cfd792b1345ebe3ae22a956f58fe7ff","sha512_sri":"sha512-tFDk65d/L3uLXuRyFZPvxCOHurxZX4gkrlx4FGpxaq+hlP69Q9ZDS9HluwjTSCPnXSWMmNbukr1JEquw8zWwlw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-staged/v/6.0.4"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-fchw-g3j3-hxh3"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-009139","import_time":"2026-07-09T16:20:44.65683469Z","modified_time":"2026-07-09T15:34:00Z","sha256":"84d908f9158abcdd631b569f812b06cb59a1788f2435dd05a47fd39021d60a49","source":"amazon-inspector","versions":["6.0.4"]},{"id":"RLMA-2026-06128","import_time":"2026-09-01T11:17:28.273822853Z","modified_time":"2026-08-24T16:43:42Z","sha256":"597b56f6d72b99d439751d09a7d83079fc063f3767ff8eb87b7a3bcfa5c21b4b","source":"reversing-labs","versions":["6.0.4"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"ReversingLabs","contact":["https://www.reversinglabs.com"],"type":"FINDER"}]}

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