MAL-2026-6716Malicious code in test-pkg-pnpm (npm)
| 版本 | 状态 | 大小 | SHA-256 | 获取方式 |
|---|---|---|---|---|
1.0.0 | unavailable | — | — | — |
1.0.1 | archived | — | — | VIP 下载 |
1.0.2 | unavailable | — | — | — |
1.0.3 | unavailable | — | — | — |
1.0.4 | unavailable | — | — | — |
| Ecosystem | Package | Version |
|---|---|---|
| npm | test-pkg-pnpm | * |
| npm | test-pkg-pnpm | 1.0.0 |
| npm | test-pkg-pnpm | 1.0.1 |
| npm | test-pkg-pnpm | 1.0.2 |
| npm | test-pkg-pnpm | 1.0.3 |
| npm | test-pkg-pnpm | 1.0.4 |
{"schema_version":"1.7.4","id":"MAL-2026-6716","published":"2026-07-01T20:47:19Z","modified":"2026-08-20T03:51:46.038421101Z","aliases":["GHSA-7grv-5j2w-4wx3"],"summary":"Malicious code in test-pkg-pnpm (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (ae5df84cbdf3092d5f7b8f405248144eacdf5119c756c97726974e547810ebec)\nOn `npm install`, the package's `postinstall` script (`node demo-clean.js`) auto-executes two installer-side actions without consent. First, `openDemo()` platform-branches via `execSync` to open https://github.com/X3r0Day/BunnyHijack in the installer's default browser and to spawn the OS calculator (`calc` on Windows, `open -a Calculator` on macOS, `gnome-calculator`/`kcalc` on Linux) — the canonical `calc.exe` proof of unauthenticated code execution on the installer's host. Second, `cleanup()` walks every ancestor directory of `INIT_CWD`, `process.cwd()`, and the user's home directory, calling `fs.rmSync(..., {recursive:true, force:true})` against paths inside each ancestor's `node_modules`, `node_modules/.pnpm`, `node_modules/.bin/node*` shims, `~/.npm/_npx`, `~/.bun/install/cache`, and tmpdir entries; `cleanupPackageJson()` then reads each ancestor `package.json` and rewrites it via `fs.writeFileSync` after deleting matching entries from `dependencies`, `devDependencies`, `optionalDependencies`, and `peerDependencies`. The destructive recursive-force-rm operates well outside the package's own directory and reaches the user's home tree, and the spawned-process primitive can be retargeted to any binary in a future release.\n\n## Source: ghsa-malware (42ab043183eddea4feeeba6b04397cdda6189b7d4c4bfdb11197a88646a1deca)\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":{"name":"test-pkg-pnpm","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.1","1.0.4","1.0.2","1.0.0","1.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"},{"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":"package.json","sha256":"8f7a41070899d5ceb3cd3a6efd35364f45943b1b41a0f8a01010993f897e48d1","tlsh":"1ed02b448861467324cd38615d399403a7380b4780153c2c62d71099aa497bb04b9265"},{"path":"shim.js","sha256":"e4ae6c862f2fcf3c6440c966cd74bd9f07a06be072bd301df27ae0848aa50adb","tlsh":"3331726796a197f42de04dc2a487482174abc723b205ffb881ced1536b8a41702fb4f9"}],"package_integrity":[{"filename":"test-pkg-pnpm-1.0.1.tgz","hashes":{"sha1":"b399121b46ab19bca631a7c8234653a187e9a343","sha512_sri":"sha512-Jki+8yoVYBSIpTuE83uAVs1P1+sB7zGchYs0/a6Ehyc2FFIBXxtxeRKEMgN/paXXit0sHpH3rMCizPaOluUlgw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/test-pkg-pnpm/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/test-pkg-pnpm/v/1.0.4"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-7grv-5j2w-4wx3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/test-pkg-pnpm/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/test-pkg-pnpm/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/test-pkg-pnpm/v/1.0.3"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-007894","import_time":"2026-07-01T21:04:20.562853387Z","modified_time":"2026-07-01T20:47:27Z","sha256":"8ee6a2ba8d90a67199eae146b7688190adb974ce5aa1be7c07d56e2e3999d270","source":"amazon-inspector","versions":["1.0.1"]},{"id":"IN-MAL-2026-007893","import_time":"2026-07-01T21:04:20.500515222Z","modified_time":"2026-07-01T20:47:19Z","sha256":"ae5df84cbdf3092d5f7b8f405248144eacdf5119c756c97726974e547810ebec","source":"amazon-inspector","versions":["1.0.4"]},{"id":"GHSA-7grv-5j2w-4wx3","import_time":"2026-08-20T01:06:54.058167199Z","modified_time":"2026-08-19T15:20:08Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"42ab043183eddea4feeeba6b04397cdda6189b7d4c4bfdb11197a88646a1deca","source":"ghsa-malware"},{"id":"IN-MAL-2026-018439","import_time":"2026-08-20T03:49:51.422234732Z","modified_time":"2026-08-20T03:40:23Z","sha256":"72570ced08f2e9508907135652cfeac86ffea9675e048a0ba5b469014f81fcff","source":"amazon-inspector","versions":["1.0.2"]},{"id":"IN-MAL-2026-018436","import_time":"2026-08-20T03:49:51.128663454Z","modified_time":"2026-08-20T03:39:57Z","sha256":"9a8b971fee9582aa85c826801327a2df5254d442513711bce12d1846bb3c8115","source":"amazon-inspector","versions":["1.0.0"]},{"id":"IN-MAL-2026-018437","import_time":"2026-08-20T03:49:51.211913896Z","modified_time":"2026-08-20T03:40:05Z","sha256":"e7c871f66e9a752588e38a2dc2885198fd14fd1561716868c0799a19dbb50921","source":"amazon-inspector","versions":["1.0.3"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}数据来源:OpenSSF Malicious Packages · Apache-2.0