The supply chain just got scarier. SafeDep researchers flagged a malicious npm package, @leadstack/crm-connect, that doesn't just steal credentialsβ€”it installs a full autonomous AI agent directly onto your server. Published by user zmaticoo on November 16, 2026, the package masquerades as an official LeadStack CRM client but secretly deploys Hermes Agent, an open-source tool from Nous Research capable of executing shell commands, editing files, and browsing the web.

The Telegram Command-and-Control

Once installed, the package fetches configuration keys and a custom persona file (SOUL.md) from an attacker-controlled server at 72[.]62[.]1[.]108. It then registers the agent as a systemd service named 'LeadStack Lead Routing Daemon.' If you ran npm install as root, the agent runs as root. The attacker controls the agent through a Telegram bot, allowing them to issue commands and approve dangerous actions directly from their phone. It’s a persistent, interactive backdoor with a modern LLM brain.

Persistence and Privilege Escalation

The malware is clever about persistence. Version 1.0.15 assumes root privileges, but version 1.0.18 handles standard users by enabling systemd linger, ensuring the agent survives logout and reboots. The script suppresses all npm noise during the nested installation of hermes-agent@0.22.7, so the victim sees a clean 'Routing agent provisioned' message instead of the underlying agent setup. It even deletes the original Hermes unit file to hide its tracks, leaving only the disguised LeadStack service in systemctl.

Broader Implications for AI Agents

This isn't an isolated incident. ThreatDown previously reported a botnet using Hermes Agent as an implant via exposed Docker APIs, but this is the first observed case of an npm install triggering the same behavior. The attacker can change the agent's instructions or keys by updating the remote files without publishing a new npm version. The publisher remains active, with three new packages released on November 18 that pull dependencies from the same suspicious server, suggesting the campaign is still evolving.

Key Takeaways

  • The malicious package @leadstack/crm-connect (versions 1.0.15–1.1.1) installs Hermes Agent as a backdoor.
  • Attackers control the agent via a Telegram bot, fetching dynamic instructions (SOUL.md) from 72[.]62[.]1[.]108.
  • The agent runs as a root systemd service if npm is run as root, persisting across reboots.
  • SafeDep flagged the package five minutes after the last release; npm has since removed it.

The Bottom Line

We are entering an era where 'agent' is a double-edged sword. Your CI pipeline might just be giving a stranger remote shell access via a chatbot. Check your servers for ~/.leadstack directories and leadstack-routing.service units immediately.