Malicious code in cache-swipper (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (50cb98e5f107fe5bd1cd9434505219880014742674def9c64a8ce8552e04a626) cache-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.
MAL-2026-17166
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:MAL-2026-17166
cache-swipper
Source reference: /affected/0/package/name
- Affected versions
- 3.6.0
Source reference:
/affected/0/versions3.5.0Source reference:
/affected/0/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"package": {
"name": "cache-swipper",
"purl": "pkg:npm/cache-swipper",
"ecosystem": "npm"
},
"versions": [
"3.6.0",
"3.5.0"
],
"database_specific": {
"cwes": [
{
"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."
}
],
"source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/cache-swipper/MAL-2026-17166.json",
"indicators": {
"evidence_files": [
{
"path": "index.js",
"tlsh": "f4710088d85a63130ab767959b091809fe3916132719d201beadd3d56f31c18f283dcf",
"sha256": "5ea5296171875e534997c56eb6159d7f19f679b491ef6bf72cb9581b97961064"
}
],
"package_integrity": [
{
"hashes": {
"sha1": "893a5dc2aa07ffa39573b77942fc300e12576ec4",
"sha512_sri": "sha512-0cH39IuMFUoIGzlmhc7Ynk/BkFILpyGJhbhlT4oGo8lp5zatX07q20XT3d2HH3BIA3GgLey1l0sqJcFKA91MhQ=="
},
"filename": "cache-swipper-3.6.0.tgz"
}
]
}
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #13833 · Revision 1
- Added to Heist Feed
- Publisher date