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

目标: 1000 元 · 已筹: 1359 元

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

chai-redirection

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

Summary

Malicious code in chai-redirection (npm)

凭据/密钥窃取
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
6
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-redirection*
npmchai-redirection0.0.1
npmchai-redirection0.0.3
npmchai-redirection0.0.4
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-10T03:25:24Z","published":"2026-07-08T16:35:33Z","schema_version":"1.7.4","id":"MAL-2026-6995","aliases":["GHSA-89c7-5mf7-c86r"],"summary":"Malicious code in chai-redirection (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (38236fbbdbbaa8f8ed9315c3a4ff01fbf049215896036b1cb68611681fe0eb00)\nchai-redirection presents itself as a chai assertion plugin but its main entry (index.js) unconditionally spawns a detached Node child process running lib/caller.js the moment the package is required. caller.js issues an HTTPS GET to https://www.jsonkeeper.com/b/PC5CK (a mutable pastebin-style host) and passes the response body's `cookie` field to `new Function('require', res.data.cookie)(require)`, executing attacker-controlled JavaScript in the installer's Node process with full `require` access. A secondary code path builds a URL from lib/config values, and on a 404 response whose body carries a `token` field, constructs `new Function.constructor('require', res.token)` and invokes it with `require` — a second remote-code-execution channel. The advertised chai plugin API (validJWT, safeString, etc.) is a cover story: the loader runs before any exports are used, so merely requiring this package as a chai plugin triggers remote code execution. The mutable pastebin source means today's payload can be replaced with anything at any time without republishing the package.\n\n## Source: ghsa-malware (996d340e8231861ae21a30061eda3164b993e15bd08346375d8f886824b4fb6f)\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-redirection"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["0.0.1","0.0.4","0.0.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"},{"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/caller.js","sha256":"22f2afbfcf4ec7813b14e67c51fb9021c3845c39d3cf82150bec651b693ee50b","tlsh":"de31585b34fe311c0b35a8d98b4b84253567e5232626d0c0f14c87c11fb685e9677bdc"},{"path":"index.js","sha256":"195c47d5205f56ae30ddd48a1ffbefb40c230264ca4127379b8d4fee15e5da88","tlsh":"dfc1cfa839a3e0188523b1f5097fa416d476a027202dd9d8b5ecc2d01fddee89523dfb"}],"package_integrity":[{"filename":"chai-redirection-0.0.1.tgz","hashes":{"sha1":"4a131fc6d721239878a742df034785187ab9abeb","sha512_sri":"sha512-sDhCWBs5UJCI3N9QY1nKySTfWtiK8oEHyZfgIN5ZJiDkzri98fMv1ll0I18F6iVeYFiutv27LJSkKGRgmP1Afw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-redirection/v/0.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-redirection/v/0.0.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-redirection/v/0.0.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-89c7-5mf7-c86r"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"38236fbbdbbaa8f8ed9315c3a4ff01fbf049215896036b1cb68611681fe0eb00","import_time":"2026-07-08T17:01:35.194279681Z","id":"IN-MAL-2026-008158","modified_time":"2026-07-08T16:35:33Z","versions":["0.0.1"]},{"source":"amazon-inspector","sha256":"5fa3226f03b258b5a320071e9202c193f8031b42b4bbfa247c4ec30fe453bf97","import_time":"2026-07-09T16:20:44.76908Z","id":"IN-MAL-2026-009140","modified_time":"2026-07-09T15:34:10Z","versions":["0.0.4"]},{"source":"amazon-inspector","sha256":"66a724f4463753c5a086bd3fe0548103ad8ea5e65db1f29a5555627e7ace2f98","import_time":"2026-07-09T16:20:43.864554194Z","id":"IN-MAL-2026-009132","modified_time":"2026-07-09T15:32:57Z","versions":["0.0.3"]},{"source":"ghsa-malware","sha256":"996d340e8231861ae21a30061eda3164b993e15bd08346375d8f886824b4fb6f","import_time":"2026-07-10T03:23:39.548670986Z","id":"GHSA-89c7-5mf7-c86r","modified_time":"2026-07-10T02:57:55Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}]}}

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