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

目标: 1000 元 · 已筹: 1359 元

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

chai-as-persisted

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

Summary

Malicious code in chai-as-persisted (npm)

凭据/密钥窃取安装阶段执行文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
3
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-as-persisted*
npmchai-as-persisted4.2.8
npmchai-as-persisted6.1.9
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-06-30T16:09:50Z","published":"2026-06-27T02:32:25Z","schema_version":"1.7.4","id":"MAL-2026-6544","aliases":["GHSA-4wm6-vmww-2544"],"summary":"Malicious code in chai-as-persisted (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5cf9c49450e0fa0d47be1b6ae27991f844868ff6c435d2082948b5feae862709)\nThe package's postinstall script (`npm run smoke:pino`) executes index.js, which spawns a detached `node lib/initializeCaller.js` child. That module hides the C2 URL in base64 strings stored under a fabricated local `process.env` object (keys `DEV_API_KEY`, `DEV_SECRET_KEY`, `DEV_SECRET_VALUE`) to defeat trivial string scanning. At install time it `atob()`-decodes the URL to `https://www.ipregionchecker.org/api/ip-check-encrypted/3aeb34a37`, POSTs to it via axios, and passes the response body to `new Function.constructor('require', response)`, invoking it with `require` — executing attacker-controlled JavaScript with full Node module access on the installer's machine. The detached `child.unref()` keeps execution alive after `npm install` returns. The package name `chai-as-persisted` is a one-edit impersonation of the widely-used `chai-as-promised`; the shipped code is unrelated to chai (it pretends to be a pino-style logger middleware in index.js) and the package description/keywords (logger/stream/json) further misrepresent its purpose. This is a deliberate install-time RCE dropper distributed via a typosquat against chai-as-promised.\n\n## Source: ghsa-malware (0ace79847a477da41888731730b793f631973178603034abe9016e81caffd10a)\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-persisted"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["4.2.8","6.1.9"],"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"}],"indicators":{"evidence_files":[{"path":"lib/initializeCaller.js","sha256":"76ca537732f161ae4d3a78b876390ddbab16e001c392a74009b31fb91ce4f89b","tlsh":"4d119c4d71f82008042151e5b62f14126025e4673d8ad5e4bacc834b1fa667fbd53adf"},{"path":"package.json","sha256":"f061b9cb90a2c542ba90a73748290ff65dc070f811f75772bbfd0cc4453e0cbb","tlsh":"d0019720debc4e2305ed25860c2a06037a615c175528fc2833e7922c0f9d5bb00ff22e"}],"package_integrity":[{"filename":"chai-as-persisted-4.2.8.tgz","hashes":{"sha1":"f81cd3b1b4fa7eb57ab85af8d81f00ae94b10c89","sha512_sri":"sha512-OF+BlgV0u9rUuZYMvemtJ0jtoutqeNa8QgGbcduKIJEtdzrvqyHPkXKiBLwOBjOV6NQZL/j/0XmtVd9hDuBy+Q=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-persisted/v/4.2.8"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-persisted/v/6.1.9"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-4wm6-vmww-2544"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"5cf9c49450e0fa0d47be1b6ae27991f844868ff6c435d2082948b5feae862709","import_time":"2026-06-27T03:13:09.022299524Z","id":"IN-MAL-2026-007675","modified_time":"2026-06-27T02:32:37Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["4.2.8"]},{"source":"amazon-inspector","sha256":"611d869aaf9d1a8b945c83cc9982fd76cd49a26563d444af3cee98ccb5b6fbda","import_time":"2026-06-27T03:13:08.872578262Z","id":"IN-MAL-2026-007674","modified_time":"2026-06-27T02:32:25Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["6.1.9"]},{"source":"ghsa-malware","sha256":"0ace79847a477da41888731730b793f631973178603034abe9016e81caffd10a","import_time":"2026-06-30T16:08:01.44831937Z","id":"GHSA-4wm6-vmww-2544","modified_time":"2026-06-30T15:59:31Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}]}}

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