swaplearn-cli: malicious npm package compromises hosts and steals secrets
Severity: critical · Patch status: unpatched · Since 2026-11-20
GitHub Advisory Database published a malware advisory for the npm package swaplearn-cli on 2026-11-20. All versions from 0 onward are affected, and no patched version exists. The advisory warns that any computer with the package installed or running should be considered fully compromised, with possible full control handed to an outside entity. Secrets and keys stored on affected machines should be rotated from a different computer. Removing the package may not eliminate all malicious software. The package has about 61 downloads per month, so exposure appears limited but high-impact for anyone who installed it. No CVE, source code, or specific exploitation reports are listed.
What to do
- Treat any host that installed or ran swaplearn-cli as fully compromised; isolate it from networks and do not trust credentials on it.
- Rotate all secrets, API keys, SSH keys, tokens, and passwords from a separate trusted machine.
- Remove the package and rebuild or reimage affected systems rather than relying on uninstall.
- Search npm caches, lockfiles, CI logs, and developer machines for swaplearn-cli and block it in registries or proxies.
- Audit for persistence and unauthorized access, and monitor for credential misuse.
Sources
All live incidents on Threat Watch