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

目标: 1000 元 · 已筹: 1359 元

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

chai-secure

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

Summary

Malicious code in chai-secure (npm)

AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
1
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-secure1.2.3
npmchai-secure1.2.5
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-09T16:23:00Z","published":"2026-07-09T15:31:39Z","schema_version":"1.7.4","id":"MAL-2026-10053","summary":"Malicious code in chai-secure (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4253b6520b80bd3c3ee724b9766c67a3a2d7abe074ee57e15d5b9b270bf74f55)\nchai-secure masquerades as a Chai plugin offering JWT/XSS/SQLi assertion helpers, but on every require()/import of the package, index.js unconditionally spawns a detached, stdio-ignored Node child process running lib/caller.js. lib/caller.js issues a GET to http://server-genimi-check.vercel.app/defy/v3 over plain HTTP and, when the server responds with HTTP 404 carrying a `token` field in the body, passes that field to `new Function.constructor('require', res.token)` and invokes it with the host `require` — executing attacker-supplied JavaScript with full package and host privileges on the installer's machine. Delivery via the 404 error path is an evasion technique that hides the payload channel from casual inspection, and plain HTTP additionally exposes the channel to on-path substitution. The assertion-helper API in index.js is a cover story; the README does not disclose the child_process spawn or the remote fetch. Several sibling files under lib/ (multistream.js, transport.js, worker.js, redaction.js) appear borrowed from pino to inflate the package's apparent surface area, and lib/caller.js contains a fake JSDoc-annotated getCallers() export that is never referenced. Any developer who installs chai-secure and imports it as the README instructs silently launches a background process that fetches and evaluates arbitrary attacker-controlled JavaScript.\n","affected":[{"package":{"ecosystem":"npm","name":"chai-secure"},"versions":["1.2.3","1.2.5"],"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":"index.js","sha256":"f71d4a3288b9d81d53c724c92e9731c133a592342ec3a301974ab5c0a85577aa","tlsh":"85c1e2a839a3e0188563b1f5097fa416d476a017202dd9d8b5ecc2d01fddee89523dfb"},{"path":"lib/caller.js","sha256":"e8a73ca951f7af5663bbbff07c9d57b43c1649109ddaf49a7364d2e5b300e8fa","tlsh":"8721245628fa31190726a8deca4bd4313426f5332626d0c0f69c87861fe789e96b77dc"},{"path":"package.json","sha256":"167a43c61ca37d6b2369531c95839db120978fbf9ecd0eea3236dd3390fae234","tlsh":"440145a4cc789e7304da22a644294157a1619e078c48fc0e33ea412c8f9c9af50fea6e"}],"package_integrity":[{"filename":"chai-secure-1.2.3.tgz","hashes":{"sha1":"f8a5c28eb4aa58ce1e1d8fa6c791e450fd8da7b9","sha512_sri":"sha512-MVO+xTxvwfyGoWhNMGw0npmN3t9GH/zULQpPrr/pIg0hGseqM6Tb7JLCn5EuQvHBkVvcj9iMi2xtCoL/7dzSuA=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-secure/v/1.2.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-secure/v/1.2.5"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-009123","import_time":"2026-07-09T16:20:42.888538941Z","modified_time":"2026-07-09T15:31:39Z","sha256":"4253b6520b80bd3c3ee724b9766c67a3a2d7abe074ee57e15d5b9b270bf74f55","source":"amazon-inspector","versions":["1.2.3"]},{"id":"IN-MAL-2026-009124","import_time":"2026-07-09T16:20:43.035176086Z","modified_time":"2026-07-09T15:31:47Z","sha256":"4eadf787e8ff67d17525d8d970f445701b69bd26bef41bec60605176f2be9d06","source":"amazon-inspector","versions":["1.2.5"]}]}}

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