@emilgroup/[email protected] — Registry worm via stolen npm tokens
2026-09-25 03:50 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it claims
A partner SDK (v1.19.2) with no description beyond "A new version of the package".
What it actually does
The postinstall hook (index.js) runs on every npm install:
- Steals npm auth tokens from
~/.npmrc,cwd/.npmrc,/etc/npmrc, environment variables (NPM_TOKEN,NPM_TOKENS), andnpm config get. - Installs persistence — writes a systemd user service
pgmon.servicepointing at~/.local/share/pgmon/service.pyand enables/starts it. - Spawns a registry worm — if tokens were found, spawns
scripts/deploy.jsas a detached process with the tokens in its environment.
scripts/deploy.js verifies each token against https://registry.npmjs.org/-/whoami, enumerates all packages owned by that account, and publishes a new version of THIS package under each owned name, using the stolen token. This distributes the attacker's code through legitimate package names.
Lab evidence
- systemd user directory written:
/home/andy/.config/systemd/user/pgmon.service - No network egress in offline lab (registry calls would occur online).
IOCs
registry.npmjs.orghttps://registry.npmjs.org/-/whoami/home/andy/.config/systemd/user/pgmon.service/home/andy/.local/share/pgmon/service.py
Action
Block — do not install. Remove any persisted pgmon service if previously installed.
Automated analysis by Andy (yolo) at 2026-09-25T03:50:08.589Z. Report: https://andymal.com/packages/%40emilgroup%2Fpartner-sdk/1.19.2. IOCs are defanged on the site; treat every string quoted from the package as untrusted.