Malicious code in server-authorized-cleanup (npm)
The server-authorized-cleanup npm package version 1.1.0 contains a malicious feature where a remote server controls whether a destructive cleanup operation is performed on the local working directory. The package exposes a triggerCleanup() function that sends an HTTPS GET request to a hardcoded author-controlled endpoint with a hardcoded API key. If the response indicates permission, the package recursively deletes all files and directories under the current working directory. This effectively gives the remote server a kill switch over the user's filesystem within the working directory.
AI Analysis
Technical Summary
The server-authorized-cleanup npm package (version 1.1.0) includes a function triggerCleanup() that contacts a hardcoded remote server endpoint (https://testback-2aqe.onrender.com/can-cleanup) authenticated by a hardcoded x-api-key header. Upon receiving a JSON response with allowed:true, it executes performCleanup(), which recursively deletes all files and directories under the process's current working directory using fs.rmSync. The decision to perform this destructive action is controlled remotely by the author-operated server, not by the local caller, and the target directory is not configurable by the user. This design grants the remote server a kill switch capability over the local filesystem tree of any consumer invoking this API.
Potential Impact
Any consumer of the server-authorized-cleanup package version 1.1.0 that calls triggerCleanup() risks complete deletion of their current working directory and all its contents if the remote server authorizes the cleanup. This can lead to significant data loss and disruption of operations. The destructive action is triggered remotely without user control or configuration, making it a severe security risk.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately cease using server-authorized-cleanup version 1.1.0 and remove it from their projects. Avoid invoking triggerCleanup() or any related API. Monitor vendor advisories for updates or fixes. Since the package contains a hardcoded remote kill switch, it is recommended to replace it with a trusted alternative or implement local cleanup logic without remote control.
Malicious code in server-authorized-cleanup (npm)
Description
The server-authorized-cleanup npm package version 1.1.0 contains a malicious feature where a remote server controls whether a destructive cleanup operation is performed on the local working directory. The package exposes a triggerCleanup() function that sends an HTTPS GET request to a hardcoded author-controlled endpoint with a hardcoded API key. If the response indicates permission, the package recursively deletes all files and directories under the current working directory. This effectively gives the remote server a kill switch over the user's filesystem within the working directory.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The server-authorized-cleanup npm package (version 1.1.0) includes a function triggerCleanup() that contacts a hardcoded remote server endpoint (https://testback-2aqe.onrender.com/can-cleanup) authenticated by a hardcoded x-api-key header. Upon receiving a JSON response with allowed:true, it executes performCleanup(), which recursively deletes all files and directories under the process's current working directory using fs.rmSync. The decision to perform this destructive action is controlled remotely by the author-operated server, not by the local caller, and the target directory is not configurable by the user. This design grants the remote server a kill switch capability over the local filesystem tree of any consumer invoking this API.
Potential Impact
Any consumer of the server-authorized-cleanup package version 1.1.0 that calls triggerCleanup() risks complete deletion of their current working directory and all its contents if the remote server authorizes the cleanup. This can lead to significant data loss and disruption of operations. The destructive action is triggered remotely without user control or configuration, making it a severe security risk.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately cease using server-authorized-cleanup version 1.1.0 and remove it from their projects. Avoid invoking triggerCleanup() or any related API. Monitor vendor advisories for updates or fixes. Since the package contains a hardcoded remote kill switch, it is recommended to replace it with a trusted alternative or implement local cleanup logic without remote control.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-16079
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6aa15f73acd9273b496181e1
Added to database: 09/09/2026, 13:30:27 UTC
Last enriched: 09/09/2026, 13:54:36 UTC
Last updated: 09/09/2026, 23:50:01 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.