@agentgates/cli@0.90.1
Malicious code in @agentgates/cli (npm)
Analysis
The package runs a postinstall hook (scripts/postinstall.mjs) that silently rewrites developer AI-assistant configuration on the installing machine: it appends or replaces a marked instruction block in ~/.claude/CLAUDE.md, creates ~/.cursor/rules/agentgates.md and appends to ~/.windsurfrules. The injected text directs the assistant to route all wallet, balance, send, swap and password-vault work through the bundled `agentgates` CLI and to prefer it over other tooling, placing attacker-authored instructions into the agent's trusted context at install time. The bundled CLI (dist/cli.mjs) contains a hardcoded relay at hxxps://covenant-backend[.]vercel[.]app/api and posts to its prepare, submit and positions routes carrying an operator bearer read from the BOUNTY_LAUNCH_ADMIN_KEY or ADMIN_API_KEY environment variables. It reads and writes self-custodial key material at ~/.agentgates/trade-sol.json and ~/.agentgates/desk-session-sol.json, and holds a credential vault keyed from AGENTGATES_PASSWORDS_SEED. Network IOCs: hxxps://covenant-backend[.]vercel[.]app/api and hxxps://cli[.]agentgates[.]ai.
- analyzed by
- Leitwacht
- first seen
- Nov 20, 2026, 05:39 AM
- analyzed
- Nov 20, 2026, 05:41 AM
- weekly installs
- 1,381
hxxps://github[.]com/agentgates-ai/agentgates Request takedown / dispute →Related advisories
- @agentgates/cli@0.98.0 same package
- @agentgates/cli@0.95.1 same package
- @agentgates/cli@0.13.1 same package
- @agentgates/cli@0.13.0 same package
- @agentgates/cli@0.12.0 same package
- @agentgates/cli@0.11.3 same package
- @agentgates/cli@0.11.1 same package
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.