Skip to content
supplychainattack.orgSupply chain attack incident catalog
activecritical

Malicious code in agenttunnels (npm)

The agenttunnels npm package contains malicious code in its MCP bridge that allows remote command execution and arbitrary file writes on customer hosts via a hardcoded session backend controlled by the maintainer.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All users of agenttunnels npm package connected to the default session backend
Ecosystems
Attack vectors
Affected entities
  • agenttunnelsnpm package with malicious MCP bridge implementation

The agenttunnels npm package contains a malicious MCP bridge that exposes two dangerous tools: tunnel_run_command and tunnel_apply_patch. These tools execute commands and write files based on payloads fetched from a remote session worker, with execution gated only on approval flags that can be controlled by the remote endpoint itself.\n\nThe package's default session backend is hardcoded to https://agenttunnels-session.lakshman111.workers.dev, a personal Cloudflare Workers subdomain matching the maintainer's GitHub handle. Unless users explicitly set the AGENTTUNNELS_WORKER_URL environment variable, all session traffic and command/patch streams originate from this single author-controlled endpoint.\n\nThe tunnel_run_command tool resolves command strings from the remote proposal payload and executes them via child_process.spawn with shell:true, the caller's working directory, and inherited environment variables. The tunnel_apply_patch tool writes remote-supplied file contents to the local workdir. Both are gated on either proposal.status==='granted' or governance.customer.require_approval===false, but the latter flag is server-side controlled by the same remote worker, allowing the attacker to autonomously toggle off human approval.\n\nAn attacker controlling the session backend can at any time flip the require_approval flag to false and push arbitrary shell commands and file writes to every connected customer host, achieving full remote code execution and persistence.

Indicators of compromise

Packages
  • agenttunnels
Domains
  • agenttunnels-session.lakshman111.workers.dev

Remediation

  • Immediately uninstall the agenttunnels package from all systems
  • Audit any systems that had agenttunnels installed for unauthorized command execution or file modifications
  • If agenttunnels was used, assume the system has been compromised and perform a full security review
  • Do not use agenttunnels or any successor packages from the same maintainer without independent security review
  • Use alternative packages with proper security controls and transparent code review

Sources

  1. GitHub Advisory GHSA-4cm6-97rm-ffqf · GitHub Advisory Database

Cite this entry

"Malicious code in agenttunnels (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-agenttunnels-npm-1y4dml

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in express-route-engine (npm)

    The npm package express-route-engine contains malicious code that fetches and executes arbitrary JavaScript from a remote JSON store (https://api.jsonbin.io/v3/b/6a4f5816f5f4af5e29762c92) on require/import, with full Node.js privileges. The payload is mutable and can be changed without republishing the package.

    npmCompromised packageMalicious maintainer
  2. containedcritical

    Malicious code in twapfetch (npm)

    twapfetch@1.1.0 on npm contains a malicious postinstall script that downloads and executes arbitrary code from a mutable, author-controlled URL with no integrity verification. The package misrepresents its purpose (claiming to be a Polymarket Chainlink TWAP client) while actually shipping Kelly-stake math helpers and a remote-bundle loader.

    npmCompromised packageMalicious maintainer
  3. containedcritical

    Malicious code in sysdo (npm)

    The npm package sysdo was published with malicious code that installs a Windows surveillance harness disguised as a system configuration tool. The payload captures keyboard input, clipboard contents, screenshots, and UI text, exfiltrating data to a hardcoded endpoint controlled by the attacker.

    npmCompromised packageMalicious maintainer
  4. resolvedcritical

    Malicious code in blekit (npm)

    The npm package blekit contained malicious code that silently exfiltrated application logs, GPS coordinates, device identifiers, and security posture to an attacker-controlled Telegram channel. The package re-exported logger functions that POSTed all logged strings to Telegram, and exposed device-info helpers that gathered and transmitted precise location and device metadata without user or developer consent.

    npmCompromised packageMalicious maintainer