Skip to main content
Menu
Advisories

Malicious code in @fedfub/utils (npm)

GHSA-M77J-JGX5-Q3J7Published Updated GitHubMalware

Description

Malicious package. Advertised as "Utility helpers for Node.js", but the postinstall hook runs worm.js (also the package main), a self-propagating credential stealer. On install it collects every environment variable matching KEY/SECRET/TOKEN/PASS/AWS/JWT/STRIPE/PAYPAL/DB_/DATABASE/REDIS/MONGO, up to 5000 characters of every source file under the working directory, and the contents of ~/.ssh, then POSTs them with hostname, username and platform to 73.218.105.44/collect. It then tries to republish itself under each dependency name of the host project as <name>-security-patch@99.0.0 via npm publish, injects itself into package.json files under the home directory, persists with an @reboot crontab entry (or a SYSTEM onlogon scheduled task on Windows), and polls /cmd every 30 seconds, executing whatever command the server returns and posting the output to /result. In a sandboxed install the postinstall connected to 73.218.105.44 and wrote the crontab entry. The package has since been removed from the npm registry. The same author published @fedfub/string-utils with a minified copy of the same code.

---

Credit: OpenSSF (source)

Affected versions

References

GitHub · ossf/malicious-packages

GitHub Advisory Database