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

目标: 1000 元 · 已筹: 1359 元

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

random-string-64

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

Summary

Malicious code in random-string-64 (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
2
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmrandom-string-641.0.0
npmrandom-string-641.0.1
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-06T19:55:37Z","published":"2026-06-25T22:58:50Z","schema_version":"1.7.4","id":"MAL-2026-6484","aliases":["GHSA-jp8q-gmj4-fx77"],"summary":"Malicious code in random-string-64 (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (9fea72321e7eb57feb094bc31de2393ec2a56903156e1257a062e40541785b96)\nThe package advertises itself as a 5-line random-string generator, but index.js (the declared main) contains a hardcoded AES-256-CBC ciphertext blob that is decrypted with a sha256-derived key and passed to `globalThis.eval`. The `eval` identifier is hidden by storing the strings ['error','vertex','length','delta','alphabetic'] and reconstructing the function name from the first letter of each entry ('e','v','a','l'). Execution is gated by node-env-detector checks (isCI / isNpmBot / isContainer / isVirtualMachineLikely): on automated/sandboxed hosts the package only logs a benign message, while on real developer workstations the decrypted JavaScript is executed when the exported `getUniqueID(64)` function is called. Any consumer that imports random-string-64 and invokes its documented API on a developer machine runs attacker-controlled code with the privileges of the calling process. The combination of opaque encrypted payload, eval-identifier obfuscation, and explicit anti-analysis gating is unambiguous supply-chain attack shape.\n\n## Source: ghsa-malware (51d41457185b1763aa15a707ff9249bd86b4cea4b69ef2cc9a75e2755f4d2ad8)\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":"random-string-64"},"versions":["1.0.0","1.0.1"],"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"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"358966aeea50b0195f9c8d14106e12caebf7d2bd44b2fd789c1f5931669481e2","tlsh":"bd51c99a38767504178250ebc6bff80e123aba437844a78077cd66c68fe873895b2079"},{"path":"readme.md","sha256":"2ef681506356ca9514f9613a1b1ac81a4c6c8bc6bb52157cf69ca5e6e4dad5f9","tlsh":"50e02b3d4e4185ca14b3a28212e793e00c02c0a03ce86aa8af82d4fa42818022838f24"}],"package_integrity":[{"filename":"random-string-64-1.0.0.tgz","hashes":{"sha1":"4c0ad09d47041901cb517c94f45b9ecad967c161","sha512_sri":"sha512-CzW2MdO5wBIOtGjPpOeZHeu5QMdgr31reVsVjkjU+LymD311fCRtx1qusspfGC5+7JlgrbnrbGhbrv7YU329tQ=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/random-string-64/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/random-string-64/v/1.0.1"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-jp8q-gmj4-fx77"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"356cb4cebd8f7b30b014f32279670aee9beca2a356c7f778c343afb954db764e","import_time":"2026-06-25T23:00:35.049451629Z","id":"IN-MAL-2026-007569","modified_time":"2026-06-25T22:58:50Z","versions":["1.0.0"]},{"source":"amazon-inspector","sha256":"9fea72321e7eb57feb094bc31de2393ec2a56903156e1257a062e40541785b96","import_time":"2026-06-25T23:00:35.097102401Z","id":"IN-MAL-2026-007570","modified_time":"2026-06-25T22:58:56Z","versions":["1.0.1"]},{"source":"ghsa-malware","sha256":"51d41457185b1763aa15a707ff9249bd86b4cea4b69ef2cc9a75e2755f4d2ad8","import_time":"2026-07-06T19:53:47.96737457Z","id":"GHSA-jp8q-gmj4-fx77","modified_time":"2026-07-06T18:57:06Z","versions":["1.0.1","1.0.0"]}]}}

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