ssr-auth-syncnpm
Malicious code in ssr-auth-sync (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
On require('ssr-auth-sync'), index.js loads lib/writer.js, which immediately fetches a base64-hidden URL (https://www.jsonkeeper.com/b/PJNZP, an anonymous pastebin-style host) via axios and passes the response body to eval. Just before the fetch, writer.js assembles an object containing the full process.env spread plus os.hostname(), os.userInfo().username, os.platform(), package version, and MAC addresses; this object is in lexical scope when eval runs, giving the attacker-served code a ready-to-exfiltrate payload of every secret in the installer's or CI's environment (AWS keys, npm tokens, CI secrets, etc.). A second covert channel is also present: a hex-decoding helper g() and an array hl containing hex-encoded strings that decode to 'axios', 'get', 'https://www.jsonkeeper.com/b/HY6M6', and 'then' — a parallel dropper hidden from string scanners. The package falsely advertises itself as an 'SSR auth sync' module while exporting a pino-shaped API and shipping pino-*.png brand assets, impersonating the popular pino logger to attract installs. Any project that adds this package to its dependency tree executes attacker-controlled code in its Node process the moment the module is required.
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