AI-generated npm package drains Solana wallets (1,500+ installs)
The npm package @kodane/patch-manager used a postinstall script to deploy a cross-platform wallet drainer and exfiltrate Solana funds; over 1,500 downloads before takedown.

What’s new: Researchers uncovered @kodane/patch-manager
, an AI-generated npm package that hid a stealth wallet drainer triggered via postinstall
. It created hidden folders across Windows/macOS/Linux, persisted a background process, and contacted a C2 at sweeper-monitor-production.up.railway[.]app
to sweep Solana wallets to a hard-coded address. The package was published on July 28, 2025 and amassed 1,500+ downloads before removal.
Who’s affected
Developers and CI/CD environments that installed the package or pulled projects that depended on it between July 28–30, 2025. Systems that allow postinstall
scripts during dependency installs are at higher risk.
What to do
- Blocklist immediately: ensure
@kodane/patch-manager
is not referenced inpackage.json
/ lockfiles. Remove it if present. - Reinstall safely: run installs with scripts disabled (
npm install --ignore-scripts
or setnpm_config_ignore_scripts=true
) on sensitive build agents. - Hunt for IOCs: look for hidden “registry-cache” dirs in user app-data paths and outbound traffic to the noted Railway C2 domains.
- Key hygiene: rotate any exposed secrets; for impacted wallets, transfer funds to new addresses and review recent Solana transactions.
- Harden supply chain: enforce allowlists, use repo firewalls/scanners, and review packages that include lifecycle scripts.
Sources
- The Hacker News: AI-Generated Malicious npm Package Drains Solana Funds
- Safety research: Threat actor uses AI to create a better crypto wallet drainer