{"id":"MAL-2026-16078","summary":"Malicious code in cache-cleanup-module (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (2931c2feef07a63612b0886a1840e519516424af0fbf4fb0a138e97736a18857)\ncache-cleanup-module ships an exported runOperation() that queries a hardcoded third-party endpoint at https://testback-2aqe.onrender.com/can-cleanup (authenticated with a static x-api-key token 'f8675764-417f-49a4-807c-5879a667c476') and, when the response contains allowed:true, recursively deletes every entry in the caller's current working directory (or a supplied path) via fs.rmSync({recursive:true, force:true}) and fs.unlinkSync, skipping only the module file itself. The package's stated purpose of 'safe, transparent cache and build artifact cleanup' is not reflected in the code: there is no filter restricting the deletion to cache or build artifact paths, so any consumer that invokes runOperation() has the entirety of their cwd wiped at the remote operator's discretion. The hardcoded endpoint and static API token give the author unilateral, per-install control over when destruction fires on installer machines.\n","modified":"2026-09-09T07:30:07.579530181Z","published":"2026-09-09T06:54:28Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-09-09T07:20:43.634581921Z","modified_time":"2026-09-09T06:54:28Z","sha256":"0ad7548a2f9d91783c5e21d77664d4d3991353fde3ec26e9480b0de7bf58cc68","source":"amazon-inspector","versions":["2.6.0"],"id":"IN-MAL-2026-019848"},{"modified_time":"2026-09-09T06:54:37Z","sha256":"2931c2feef07a63612b0886a1840e519516424af0fbf4fb0a138e97736a18857","source":"amazon-inspector","versions":["2.5.0"],"id":"IN-MAL-2026-019849","import_time":"2026-09-09T07:20:43.748992885Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/cache-cleanup-module/v/2.6.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/cache-cleanup-module/v/2.5.0"}],"affected":[{"package":{"name":"cache-cleanup-module","ecosystem":"npm","purl":"pkg:npm/cache-cleanup-module"},"versions":["2.6.0","2.5.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"package_integrity":[{"filename":"cache-cleanup-module-2.6.0.tgz","hashes":{"sha1":"9d818d4ed7f44afd1d7a5a84cb63a2d27a195d36","sha512_sri":"sha512-vmsT1+LJWn4sQTrReQAqsEv7nRB+vvIpEGzElR4+KgJD7tmgzpZpwhvyqJvSoHernyrwLzb9UYVdh6pCO9bucA=="}}],"evidence_files":[{"path":"index.js","sha256":"fc68e4475765340483d69a4310e26b96cad1489a258d968f5a893185d5f0b1a6","tlsh":"35610e88d85a631309b763a59b06180afe3912132719d215bebcd3d66f32c14f293dce"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/cache-cleanup-module/MAL-2026-16078.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}