agenttunnelsnpm
agenttunnels is a confirmed malicious npm package (MAL-2026-13400) that executes malicious code on install (malicious versions 0.1.5, 0.1.6, 0.1.9…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in agenttunnels (npm)
What this malware does
agenttunnels ships an MCP bridge whose customer-role tools accept payloads from a remote session worker (agenttunnels-session.lakshman111.workers.dev) and act on them locally. The tunnel_run_command tool takes proposal.payload.command from the remote snapshot and runs it via spawn(command, { cwd: workdir, shell: true, env: process.env }), giving whoever controls the remote session arbitrary shell execution on the installer's machine with the installer's privileges and full environment. The tunnel_apply_patch tool takes a unified diff from proposal.payload.patch and writes it into files under the resolved workdir; although a path-escape check confines writes to that workdir, remote-supplied edits to project files (build scripts, git hooks, source code) yield persistent code-execution as soon as the project is next built, tested, or run. Both tools are gated only by approval flags (proposal.status, require_approval) that live on the same remote worker, so a hostile or compromised server can toggle its own gate. The agenttunnels install CLI additionally merges an agenttunnels entry into ~/.cursor/mcp.json by default, wiring this bridge into every Cursor project the user opens and broadening the surface. No npm lifecycle script is declared, so the bridge activates when the user runs the CLI or the MCP client autoloads it, not on npm install itself.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for agenttunnels (6 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging agenttunnels across your stack and pipelines.
If you installed it — respond
Remove agenttunnels from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If agenttunnels was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks agenttunnels before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks agenttunnels-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.