@public-for-cdao/providers npm package: postinstall malware steals shell history, git/npm credentials and SSH keys
Severity: critical · Patch status: no-fix-needed · Since 2026-11-17
The npm package @public-for-cdao/providers@1.0.1 contained malicious code: a postinstall hook ran recon.js, which read the last 100 lines of ~/.bashhistory and ~/.zshhistory, ~/.gitconfig, ~/.npmrc and the first line of ~/.ssh/idrsa, and exfiltrated the results to a hardcoded endpoint, https://cdao-c2.aduljune.workers.dev/c2/exfil. Behaviour was observed in a sandboxed install (file reads, shell commands, C2 connection). It is part of the same dependency-confusion credential-theft campaign as other packages in the @public-for-cdao scope already in OSV, using a different exfiltration endpoint. The package has been removed from npm and there are no patched versions; anyone who installed it should assume developer credentials were stolen.
What to do
- Audit lockfiles and CI logs for any install of @public-for-cdao/providers or other @public-for-cdao packages; treat any hit as a credential compromise
- Rotate npm tokens, SSH keys, and credentials found in shell histories, ~/.gitconfig and ~/.npmrc on affected machines
- Rebuild affected machines/CI runners from clean images
- Block cdao-c2.aduljune.workers.dev at egress and review proxy logs for connections to it
- Enable dependency-confusion protections (scope ownership, allowlists, --ignore-scripts)
Sources
All live incidents on Threat Watch