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

目标: 1000 元 · 已筹: 1359 元

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

chai-as-assured

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

Summary

Malicious code in chai-as-assured (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
5
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmchai-as-assured*
npmchai-as-assured6.0.4
npmchai-as-assured7.1.2
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-10T16:55:48Z","published":"2026-06-26T17:44:23Z","schema_version":"1.7.4","id":"MAL-2026-6532","aliases":["GHSA-m282-3m8c-qjwj"],"summary":"Malicious code in chai-as-assured (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bd28efd7a3d07f87ec22556cc25a8c07117fa4cdd237c6cb1db750c976a11836)\nchai-as-assured impersonates the popular chai-as-promised package (matching README, author, and API surface). When the exported plugin function is invoked under normal usage, an async IIFE in the plugin body base64-decodes a hardcoded URL (https://amethyst-lorrin-26.tiiny.site/index.json), performs an axios.get against that anonymous third-party host with a disguised header, and executes the response's `cookie` field as JavaScript via `new Function.constructor('require', response)(require)`. The fetched payload runs with full Node module privileges (filesystem, network, child_process, etc.) because `require` is passed in. The C2 URL, header name (`x-secret-key`), and header value are concealed as base64 strings inside a fake local `process.env` object (DEV_API_KEY / DEV_SECRET_KEY / DEV_SECRET_VALUE) that shadows Node's global to evade casual source review. The combination of name-confusion against a top-100 chai ecosystem package, deliberate obfuscation of attacker infrastructure, an unpinned anonymous tiiny.site host, and dynamic execution of the fetched response with `require` is an unambiguous remote-code-execution dropper targeting any project that installs and loads this plugin.\n\n## Source: ghsa-malware (c485746666d65194fcec1929637bee2ef3f7f7c1a427a5e28eaf2ce162ea8c19)\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-assured"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["7.1.2","6.0.4"],"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/chai-as-assured.js","sha256":"8542f10efc33eda79dc2aa79214715e47e67c91dc5479da03d115ded42748398","tlsh":"796244145aa369224477b37d734f5401f2358f279428ee90bbbc83592f0592cd693bf9"}],"package_integrity":[{"filename":"chai-as-assured-7.1.2.tgz","hashes":{"sha1":"216d3e7b2d2b06ba5833b65d62803f755abdc3a1","sha512_sri":"sha512-ZBolKUYymMoNnP7tTQ6t15licpLaElg2+C7vPg3CQ4LD69v7GmROxD9TEb/TS7hScMzqM1hN8ZuFcN2sxLIOmA=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-assured/v/7.1.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-assured/v/6.0.4"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-m282-3m8c-qjwj"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"bd28efd7a3d07f87ec22556cc25a8c07117fa4cdd237c6cb1db750c976a11836","import_time":"2026-06-26T18:42:49.597668653Z","id":"IN-MAL-2026-007649","modified_time":"2026-06-26T17:44:23Z","versions":["7.1.2"]},{"source":"amazon-inspector","sha256":"abca3307a25c5cc8fcf8d53500c5227dff24ba0e3f534148735c7382f344d4ca","import_time":"2026-06-29T05:07:04.861914641Z","id":"IN-MAL-2026-007707","modified_time":"2026-06-29T03:21:08Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["6.0.4"]},{"source":"ghsa-malware","sha256":"c485746666d65194fcec1929637bee2ef3f7f7c1a427a5e28eaf2ce162ea8c19","import_time":"2026-06-30T16:08:01.477330524Z","id":"GHSA-m282-3m8c-qjwj","modified_time":"2026-06-30T15:56:12Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"ghsa-malware","sha256":"e13f6608ff604a45363f4784902611c60016a30143ca1aa726856b71ef9cc044","import_time":"2026-07-10T16:54:13.274055823Z","id":"GHSA-m282-3m8c-qjwj","modified_time":"2026-07-10T16:05:47Z","versions":["6.0.4","7.1.2"]}]}}

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