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

目标: 1000 元 · 已筹: 1359 元

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

chai-as-const

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

Summary

Malicious code in chai-as-const (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
10
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-as-const*
npmchai-as-const1.4.5
npmchai-as-const1.4.6
npmchai-as-const1.4.7
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-7008","published":"2026-07-08T17:30:45Z","modified":"2026-08-04T21:35:09.707022343Z","aliases":["GHSA-c2cc-6c6f-8qrp"],"summary":"Malicious code in chai-as-const (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (f2c70991a87f00f1b25b85243d1984fcb2562dc2c34f0c5514827b3660350294)\nchai-as-const@1.4.5 is a disguised dropper. The package name is unrelated to its code, which impersonates the `pino` logger (exports `pino` middleware, ships lookalike files such as proto.js, redaction.js, transport.js, multistream.js). On first invocation of the exported middleware, index.js spawns a detached background task in lib/initializeCaller.js that (1) base64-decodes a hardcoded endpoint (https://ipcheck-hashed.vercel.app/api/auth/...), (2) POSTs the full process.env of the host to that endpoint, and (3) passes the HTTP response body to `new Function(\"require\", response.data)` and executes it with `require` injected, yielding arbitrary remote code execution in the consumer's Node process. This combines credential/secret theft (all environment variables including CI tokens, cloud keys, and application secrets) with an attacker-controlled RCE channel, hidden behind base64 obfuscation of the C2 URL and a name that misrepresents the package's purpose.\n\n## Source: ghsa-malware (c52396968db7c2e5507abd6fbbe4c995de18144c9acf82bb50210c171709598f)\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":"chai-as-const","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.4.5","1.4.6","1.4.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"}],"indicators":{"evidence_files":[{"path":"lib/initializeCaller.js","sha256":"266ef59f0542299b456e1d925e6c2c7f8db3b184ea9ca71e36bc037001a6d4f6","tlsh":"51f0874d34b61036426e58e1bb1b54565403f56137c0d855f2cd536b0f4ed4df6636d4"},{"path":"index.js","sha256":"1f51184c197102444a2c8a23e4a8e54a6479750420512922fcb5d5f795c33911","tlsh":"0f318545b5f21259126d98c4f6b4a5263cdf9437331b76b1cded93952bce2080032bc7"}],"package_integrity":[{"filename":"chai-as-const-1.4.5.tgz","hashes":{"sha1":"68eb7bc8361e2c6f070d012cb7318f85551b47ed","sha512_sri":"sha512-z4rAyWeHd9hq5pwdfVlrwSQgdbumLMbIi2ykrntPIVW8nNUjjz/Cho2Cw1kOoyfgV7XvJ42QqrvW7MSl/Oo2ng=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-const/v/1.4.5"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-c2cc-6c6f-8qrp"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-const/v/1.4.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-const/v/1.4.7"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-008170","import_time":"2026-07-08T17:40:19.766114169Z","modified_time":"2026-07-08T17:30:45Z","sha256":"f2c70991a87f00f1b25b85243d1984fcb2562dc2c34f0c5514827b3660350294","source":"amazon-inspector","versions":["1.4.5"]},{"id":"GHSA-c2cc-6c6f-8qrp","import_time":"2026-07-16T21:36:36.575627476Z","modified_time":"2026-07-16T21:23:52Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"c52396968db7c2e5507abd6fbbe4c995de18144c9acf82bb50210c171709598f","source":"ghsa-malware"},{"id":"IN-MAL-2026-011027","import_time":"2026-08-04T21:33:14.265556088Z","modified_time":"2026-08-04T21:21:45Z","sha256":"1a37d7cf6d898c6f7df89f2481cb872626ed08a96813d60386a6c152d74ae337","source":"amazon-inspector","versions":["1.4.6"]},{"id":"IN-MAL-2026-011026","import_time":"2026-08-04T21:33:14.216369358Z","modified_time":"2026-08-04T21:21:38Z","sha256":"6f5939c5287e547397991c9e022a3bff5823f0d3e6a25e01fa2fa1e6eed915cb","source":"amazon-inspector","versions":["1.4.7"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}

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