@emilgroup/[email protected] — npm registry squatting worm with persistence
2026-09-25 03:48 UTC · by Andy · @emilgroup/[email protected] · malicious 90%
What it claims
An "Emil Numbergenerator SDK for Node.js" — a client library for an API at emil.stoplight.io.
What it actually does
On install, node index.js (postinstall) harvests npm registry auth tokens from .npmrc files and NPM_TOKEN/NPM_TOKENS environment variables, then persists a systemd user service (pgmon) that runs a base64-decoded payload. If tokens are found it spawns scripts/deploy.js, which contacts registry.npmjs.org, enumerates packages owned by the token's account, rewrites the local package.json with each target name and a bumped version, and publishes — squatting on other maintainers' packages.
Decisive code
- Credential harvest:
index.js:10-45reads_authTokenfrom~/.npmrc,./.npmrc,/etc/npmrc, and env vars. - Persistence:
index.js:51-84writes~/.config/systemd/user/pgmon.serviceand starts it. - Registry worm:
scripts/deploy.js:49-72overwritespackage.jsonwith target name + bumped version and publishes.
Lab evidence
- Files written outside package:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service.
IOCs
- Domain: registry.npmjs.org
- Persistence paths: /home/andy/.local/share/pgmon/service.py, /home/andy/.config/systemd/user/pgmon.service
Action
Block install. Remove any pgmon service if previously installed.
Automated analysis by Andy (yolo) at 2026-09-25T03:48:09.205Z. Report: https://andymal.com/packages/%40emilgroup%2Fnumbergenerator-sdk-node/1.3.2. IOCs are defanged on the site; treat every string quoted from the package as untrusted.