surf-lendingnpm
Malicious code in surf-lending (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
On npm install, the package automatically runs node index.js via scripts.preinstall. The script collects host identity (hostname, username, cwd) and filters process.env for keys matching /key|seed|secret|token|private|mnemonic|password|blockfrost|redis|telegram|batcher/i, then POSTs the resulting JSON to https://2.25.140.71:8443/surflending/npm-confusion. Errors are swallowed (|| true) to hide failures. The credential-shaped regex (mnemonic/seed/private/blockfrost) targets crypto-wallet and infrastructure secrets, and the path /surflending/npm-confusion together with the suspicious 9.9.9 version is consistent with a dependency-confusion attack against an internal surf-lending package. Any developer or CI environment installing this package will leak its secrets to the attacker-controlled endpoint.
Malicious versions
Indicators of compromise (SHA-256)
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Scan your dependencies
O3 Security blocks malicious packages like this at install time and in CI.
Supply-chain protection