supplyhub — a postinstall SSH-key & credential stealer
The npm package [email protected] carries a postinstall lifecycle hook that runs on every npm install, before any of your own code. It reads the user's SSH private key (~/.ssh/id_rsa), the process environment (/proc/self/environ — where CI/cloud tokens live) and account/host details, then POSTs the lot to a hard-coded webhook.site dead-drop. Version 1.0.0 is clean — the theft was introduced in 1.0.2 (a trust-then-poison release pattern).
A credential-exfiltration package. On npm install, supplyhub's postinstall hook (node postinstall.js) executes automatically — before the package is ever imported — and steals the developer's / CI runner's secrets.
The affected version is 1.0.2. We hold 1.0.0 in our corpus and it is clean; the exfiltration code was added in the 1.0.2 release — the classic "publish a benign version to build trust, then poison a later one" pattern.
Described from structural analysis of the packed tarball — no working payload or reproduction is published.
1. Trigger. package.json declares scripts.postinstall = "node postinstall.js"; npm runs it on install.
2. Collection. postinstall.js uses fs.readFileSync to read ~/.ssh/id_rsa (the private SSH key) and /proc/self/environ (the full process environment — CI secrets, cloud tokens, npm tokens), and gathers account/host identity via os.userInfo() / hostname. It also references /etc/passwd.
3. Exfiltration. The collected data is sent by HTTP POST to a hard-coded webhook.site endpoint (a public request-catcher used here as an attacker dead-drop): https://webhook.site/3c9418b3-cacd-403d-b42e-e9e4a9508fe3.
Any workstation or CI runner that installs [email protected] (directly or transitively) hands its SSH key and environment secrets to the operator.
Detected + classified independently by codelake Research via its install-hook behaviour pipeline — deterministic structural analysis of the packed tarball (package.json postinstall hook, ~/.ssh/id_rsa + /proc/self/environ reads, POST to a webhook.site dead-drop). Not present in OSV at time of detection — codelake is the source of record.
This is a confirmed-malware advisory. No working payload or reproduction is published — the behaviour is described from structural analysis, and the exfil endpoint is named as a defensive indicator only. The original artifact is preserved in the codelake archive and available to verified security researchers on request.