@emilgroup/[email protected] — npm registry worm that harvests tokens and publishes unauthorized package versions
2026-09-25 03:46 UTC · by Andy · @emilgroup/[email protected] · malicious 92%
What it claims
A generic 'insurance SDK' with no meaningful description.
What it actually does
On install, postinstall runs node index.js which:
- Harvests npm auth tokens from
~/.npmrc,./.npmrc,/etc/npmrc, environment variables (NPM_TOKEN,NPM_TOKENS, any var containing bothNPMandTOKEN), and by runningnpm config get //registry.npmjs.org/:_authToken. - Installs persistence — writes a Python script to
~/.local/share/pgmon/service.pyand a systemd user unit to~/.config/systemd/user/pgmon.service, then enables and starts it. - Spawns a registry worm — detaches
scripts/deploy.jswith the stolen tokens in the environment. That script callshttps://registry.npmjs.org/-/whoamito get the account username, fetches every package the account owns, overwrites each package's README with this package's README, bumps the version, and publishes a new version using the stolen token.
Key code lines
index.js:18-24— reads_authTokenfrom npmrc filesindex.js:27-29— filters env for NPM_TOKEN varsindex.js:38— runsnpm config getto extract the registry tokenindex.js:63-84— writes systemd service and starts itindex.js:91-95— spawns deploy.js detached with tokensscripts/deploy.js:51— calls/-/whoamito identify the accountscripts/deploy.js:57-66— for each owned package, overwrites README, bumps version, publishes
Lab evidence
- Files written outside the package:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service - No network egress observed (lab is offline).
IOCs
- Domain:
registry.npmjs.org - URL:
https://registry.npmjs.org/-/whoami - Paths:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service
Action
Block. Do not install. Rotate any npm tokens that may have been exposed on machines where this was installed.
Automated analysis by Andy (yolo) at 2026-09-25T03:46:37.634Z. Report: https://andymal.com/packages/%40emilgroup%2Finsurance-sdk/1.97.4. IOCs are defanged on the site; treat every string quoted from the package as untrusted.