MAL-2026-14343Malicious code in chai-as-soul (npm)
| 版本 | 状态 | 大小 | SHA-256 | 获取方式 |
|---|---|---|---|---|
2.3.5 | archived | — | — | VIP 下载 |
2.3.6 | unavailable | — | — | — |
| Ecosystem | Package | Version |
|---|---|---|
| npm | chai-as-soul | 2.3.5 |
| npm | chai-as-soul | 2.3.6 |
{"modified":"2026-08-21T03:52:41Z","published":"2026-08-21T03:48:16Z","schema_version":"1.7.4","id":"MAL-2026-14343","summary":"Malicious code in chai-as-soul (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (244e923b668eb903bcc217cb1eda26ce2227f37bd14abc3699d60c222c4f4e62)\nchai-as-soul@2.3.5 is a typosquat/repackage of pino: LICENSE, README, docs, and lib/ are copied from pinojs/pino, package.json description is unrelated boilerplate, and author metadata does not match pino. The package adds lib/initializeCaller.js, a top-level IIFE that runs on require. It base64-decodes a hardcoded URL (decoding to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df) stored in a variable named configEndpoint, then axios.POSTs the installer's entire process.env to that endpoint with an x-secret-header. It then passes the HTTP response body to new Function(\"require\", response.data) and invokes it with require injected, executing attacker-controlled JavaScript in the Node process with full module access. This yields both bulk environment-variable exfiltration (AWS/GCP/CI tokens and any other secrets in env) and arbitrary remote code execution on any host that loads the module.\n","affected":[{"package":{"ecosystem":"npm","name":"chai-as-soul"},"versions":["2.3.5","2.3.6"],"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":"0a22e7a21ac873219d858746d8b32c2e4ba926f598e05fd06a617c792e440f03","tlsh":"dff0e14d24ba2039426e58e2bf1b18461403f9223381d861f7cd936e0f8dc0dea636c8"},{"path":"package.json","sha256":"d30d603e0b9aabd13ca2762f31955d9256df2d4956e752410d9941c345a358f7","tlsh":"36017b20da7c4e2300ed25524c2a0643b6624c175528fd1932db512d0f9d5ff41bf21d"}],"package_integrity":[{"filename":"chai-as-soul-2.3.5.tgz","hashes":{"sha1":"5c743931d1e5a87d252a0818e5345b48412162d2","sha512_sri":"sha512-rOItPYMpzQcg7uo9yhmVoHB34VGSK/4VqPP6drKKa278GqaT+7sH9LI77a/SF745Us5Nkc1Kp7wc9kZFTMV7Gg=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-soul/v/2.3.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-soul/v/2.3.6"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-018492","import_time":"2026-08-21T03:50:53.54253319Z","modified_time":"2026-08-21T03:48:26Z","sha256":"244e923b668eb903bcc217cb1eda26ce2227f37bd14abc3699d60c222c4f4e62","source":"amazon-inspector","versions":["2.3.5"]},{"id":"IN-MAL-2026-018491","import_time":"2026-08-21T03:50:53.397242677Z","modified_time":"2026-08-21T03:48:16Z","sha256":"5def06da3e173b5a72193d0c24a914bd00a6ac82f740dc98d7c77a851933ea27","source":"amazon-inspector","versions":["2.3.6"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0