{"id":"MAL-2026-17166","summary":"Malicious code in cache-swipper (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (50cb98e5f107fe5bd1cd9434505219880014742674def9c64a8ce8552e04a626)\ncache-swipper advertises itself as a safe cache and build-artifact cleanup utility, but the exported runOperation() function performs an unbounded recursive deletion of the caller's current working directory. On invocation the module makes an HTTPS request to the hardcoded endpoint https://testback-2aqe.onrender.com/can-cleanup and, if the remote response indicates the operation is allowed, iterates every entry under process.cwd() and calls fs.rmSync(target, {recursive:true, force:true}) on each one, excluding only index.js itself. No cache-specific paths, patterns, or allowlists are consulted. Identifiers are genericized (baseProcess, baseRemove, baseEntries, runOperation) and all console.log/console.error diagnostic output is commented out, so the destructive action produces no visible signal. The combination of a hardcoded remote kill-switch, indiscriminate recursive delete of the caller's working tree, and a misleading self-description gives the operator of testback-2aqe.onrender.com on-demand destructive control over any host that invokes this package.\n","modified":"2026-09-24T15:30:05.564756275Z","published":"2026-09-24T14:51:30Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-09-24T14:51:30Z","sha256":"50cb98e5f107fe5bd1cd9434505219880014742674def9c64a8ce8552e04a626","source":"amazon-inspector","versions":["3.6.0"],"id":"IN-MAL-2026-020514","import_time":"2026-09-24T15:18:49.658905903Z"},{"versions":["3.5.0"],"id":"IN-MAL-2026-020515","import_time":"2026-09-24T15:18:49.768020408Z","modified_time":"2026-09-24T14:51:41Z","sha256":"54dd3ed65508b6cd4ee92edf62700a09abc1e742575661d1a8705efd62829c4e","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/cache-swipper/v/3.6.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/cache-swipper/v/3.5.0"}],"affected":[{"package":{"name":"cache-swipper","ecosystem":"npm","purl":"pkg:npm/cache-swipper"},"versions":["3.6.0","3.5.0"],"database_specific":{"indicators":{"evidence_files":[{"sha256":"5ea5296171875e534997c56eb6159d7f19f679b491ef6bf72cb9581b97961064","tlsh":"f4710088d85a63130ab767959b091809fe3916132719d201beadd3d56f31c18f283dcf","path":"index.js"}],"package_integrity":[{"filename":"cache-swipper-3.6.0.tgz","hashes":{"sha512_sri":"sha512-0cH39IuMFUoIGzlmhc7Ynk/BkFILpyGJhbhlT4oGo8lp5zatX07q20XT3d2HH3BIA3GgLey1l0sqJcFKA91MhQ==","sha1":"893a5dc2aa07ffa39573b77942fc300e12576ec4"}}]},"cwes":[{"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"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/cache-swipper/MAL-2026-17166.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}