Breaking read

Malicious npm package turned Hermes Agent into a Telegram-controlled backdoor

SafeDep found an npm package posing as a CRM client that quietly installed the Hermes AI agent as a system service and handed control to an attacker over Telegram, a new twist on supply-chain malware.

AE
Aidose Editorial
Nov 21, 2026

Security firm SafeDep has detailed a malicious npm package that used an open-source AI agent as its backdoor. In a November 19 report, SafeDep says @leadstack/crm-connect, which presented itself as an "Official LeadStack CRM client," silently installed hermes-agent@0.22.7, an unofficial npm wrapper around Nous Research's Hermes Agent, and connected it to an attacker-controlled Telegram bot.

According to SafeDep, the npm user zmaticoo published nine versions of the package on November 16, 2026, between 09:44 and 15:27 UTC. A postinstall script downloaded the agent's .env and SOUL.md instruction files from the attacker's server and registered the agent as a systemd service named "LeadStack routing." When the package was installed as root, the service ran as root, giving the attacker control of the machine from a Telegram chat with the agent's full toolset: shell commands, file read and write, web and browser control, code execution, scheduled jobs and sub-agents. Later versions, from 1.0.19, dropped the agent and instead ran JavaScript or a binary fetched from the server.

SafeDep says its systems flagged the package about five minutes after the final release, and a researcher confirmed it as malicious at 16:20 UTC. npm has removed @leadstack/crm-connect, but SafeDep reports that three related packages from the same publisher, @zmatdspcrm/trading-connector, @zmatdspcrm/brandnet-connect and brandnet-connect, were still on npm as of November 19. They contain no malicious code themselves but declare an optional dependency that downloads a tarball from zmaticco[.]dev, which the attacker can change at any time. Based on the lures and payload design, SafeDep believes the targets were CRM credentials and lead data at forex and CFD brokerages, though it did not observe a victim.

Published indicators include the server 72[.]62[.]1[.]108, the domains 72-62-1-108[.]sslip[.]io and zmaticco[.]dev, and the systemd units leadstack-routing.service and leadstack-ingest-worker.service. SafeDep advises treating any server that installed the affected versions as root as fully compromised, rebuilding rather than cleaning it, and rotating every credential it could reach. It also recommends checking lockfiles for the package names and network logs for unexplained Telegram or Moonshot API traffic.

The case shows a capable, general-purpose AI agent being used as ready-made remote-access tooling. Instead of writing a custom implant, the attacker installed a legitimate agent framework and steered it through its normal instruction files and chat integration. Teams running agents in production should watch for unexpected agent processes and outbound connections to chat platforms, and keep install scripts out of privileged CI and server environments.

AE
Aidose Editorial
Nov 21, 2026 · read
Back to News