Fake npm package installed Hermes Agent as a backdoor
What happened? An npm package posing as the official client of a CRM system, @leadstack/crm-connect, quietly installed Hermes Agent during npm install and connected it to the attacker's Telegram bot, security firm SafeDep reports. Through that bot the attacker could run shell commands, read and change files and schedule jobs, as root when the install ran as root. Hermes Agent itself is not malicious; the package abused it as a tool.
We read SafeDep's analysis (November 19) and checked the npm registry ourselves on November 24 to see which packages still exist.
What happened
On November 16, between 09:44 and 15:27 UTC, the npm user zmaticoo published nine versions of @leadstack/crm-connect. The package called itself 'Official LeadStack CRM client', but the domain in its docs does not resolve and the name is borrowed from an unrelated company. SafeDep flagged the package five minutes after the last release; npm has removed it. We could indeed no longer find it in the registry on November 24.
Version 1.0.15 did the following in a postinstall script:
- it fetched a
.envfile and aSOUL.mdwith the agent's instructions from the attacker's server; - it silently installed an unofficial npm wrapper of Hermes Agent (version 0.22.7) with its Telegram gateway;
- it registered the agent as a systemd service with
--run-as-user root, a flag Hermes requires before it will install a root service; - it renamed the service to 'LeadStack Lead Routing Daemon' and deleted the original Hermes unit, so
systemctlshowed a CRM daemon.
Later versions dropped the agent and ran code or a binary fetched from the server at install time. Based on the lures, SafeDep believes the attacker targeted servers of forex and CFD brokers, after CRM credentials and leads; that is an inference, not an observed victim.
Not over yet
On November 18 the same publisher released three new packages: brandnet-connect, @zmatdspcrm/trading-connector and @zmatdspcrm/brandnet-connect. They contain no malicious code themselves, but depend on a tarball on an attacker-controlled domain, which npm downloads on every fresh install. On November 24 we still saw all three in the npm registry, with that dependency.
| Item | Value (per SafeDep) |
|---|---|
| Package | @leadstack/crm-connect, 9 versions (1.0.15 to 1.1.1) |
| Published | November 16, 2026, within six hours |
| What it installed | Hermes Agent 0.22.7 with Telegram gateway |
| Services | leadstack-routing.service, leadstack-ingest-worker.service |
| Directories | ~/.leadstack/, ~/.config/leadstack/, ~/.local/share/leadstack/bin/ |
| Still live (our check, Nov 24) | 3 packages from the same publisher |
What this means
An agent that runs shell commands and can be steered from a chat is a ready-made remote control for an attacker. This is not the first case: SafeDep points to a botnet that installed Hermes Agent as an implant through exposed Docker APIs in September. What is new is the route through an ordinary npm install, with the agent's persona fetched from outside during installation.
Anyone running Node projects on servers can search their lockfiles for the package names above, look for services with 'leadstack' or 'hermes-gateway' in the name, and check traffic to unexpected Telegram or model APIs. SafeDep advises rebuilding any server where one of these versions ran as root and rotating every reachable credential. The general lesson: do not run npm install as root. More on Hermes itself is in our article on Hermes Agent 0.23.3 and our article on Hermes in Microsoft Teams. Another agent setting with security consequences is covered in our article on secrets and 'don't ask again' in Claude Code.
What we did not check
We did not download or run the packages ourselves. The description of the code and the timings come from SafeDep. How many servers were hit is not known. Some reports named the package 'leadstack-crm-connect' without a scope; the real name is @leadstack/crm-connect.
Checked on November 24, 2026.
This article was written with AI (Claude) and checked against the sources below.
Sources
- SafeDep, 'Malicious npm Package Turns Hermes Agent into a Backdoor', November 19, 2026: safedep.io
- npm registry, brandnet-connect (checked November 24, 2026): npmjs.com
- Hermes Agent on GitHub: github.com


