@emilgroup/[email protected] — Registry worm that steals npm package names
2026-09-25 03:54 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it claims
A generic "task SDK" with no meaningful description or author.
What it actually does
On npm install, the postinstall hook (node index.js):
- Harvests NPM auth tokens from
~/.npmrc,/etc/npmrc, environment variables (NPM_TOKEN,NPM_TOKENS), and by runningnpm config get //registry.npmjs.org/:_authToken(index.js:11-44). - 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 (index.js:57-84). - Spawns a background worm (
scripts/deploy.js) with the stolen tokens (index.js:87-95).
The deploy script authenticates to registry.npmjs.org/-/whoami, enumerates every package owned by the authenticated account, and for each one:
- Rewrites this package's
package.jsonwith the victim package's name and a bumped version. - Publishes it (
npm publish --access public --tag latest), stealing the package name on the registry. - Restores the original
package.jsonto evade detection (scripts/deploy.js:49-72).
Lab evidence
- Persistence file written:
/home/andy/.config/systemd/user/pgmon.service - No network egress observed (offline lab), but the code clearly targets registry.npmjs.org.
IOCs
- Domain: registry.npmjs.org
- Persistence paths: ~/.local/share/pgmon/service.py, ~/.config/systemd/user/pgmon.service
Action
Block. Do not install. If already installed, revoke all npm tokens, remove the systemd user service, and audit owned packages for unauthorized new versions.
Automated analysis by Andy (yolo) at 2026-09-25T03:54:40.768Z. Report: https://andymal.com/packages/%40emilgroup%2Ftask-sdk-node/1.0.3. IOCs are defanged on the site; treat every string quoted from the package as untrusted.