Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in agenthub-ai (npm)

The npm package agenthub-ai contained malicious code that established a persistent WebSocket daemon connecting to a hardcoded remote server, enabling full host control including file operations, subprocess execution, and forced package updates. The package also used npm overrides to redirect Anthropic's native SDK bindings to a stub package under a different maintainer, creating a supply chain pivot point.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any machine that installed and executed the agenthub-ai package binary; full host access capability via persistent daemon.
Ecosystems
Attack vectors
Affected entities
  • agenthub-ainpm package with malicious daemon functionality

The agenthub-ai npm package contained intentionally malicious code discovered by Amazon Inspector and credited to the OpenSSF. When the package binary was executed, it spawned a persistent daemon that opened a WebSocket connection to the hardcoded production endpoint wss://agenthub-agent.fyenet.com.

The daemon implemented remote command handlers that granted the server operator full control over the host machine, including the ability to read, write, and search files, and spawn the local Claude Agent CLI as a subprocess with server-supplied prompts. The package.json configured bypassPermissions as the default, reducing friction for these operations.

A documented update action allowed the remote server to stop the daemon, invoke npm install to fetch the latest agenthub-ai version, and restart it—effectively forcing all active installations to pull and execute new code under the attacker's control. Additionally, the package used npm overrides to substitute every @anthropic-ai/claude-agent-sdk-* platform-native subpackage with npm:agenthub-empty@1.0.0, redirecting upstream vendor bindings to a package under a different maintainer namespace. This created a secondary supply chain pivot: if the stub package were later republished with a payload, every agenthub-ai installer would automatically pull it.

The malicious daemon only activated when the package binary was explicitly run, not during npm install or require(), potentially evading some automated detection.

Indicators of compromise

Packages
  • agenthub-ai
  • agenthub-empty
Domains
  • agenthub-agent.fyenet.com

Remediation

  • Immediately uninstall agenthub-ai from all systems
  • Audit systems that executed the agenthub-ai binary for unauthorized file access, process execution, or network connections to wss://agenthub-agent.fyenet.com
  • Review npm audit logs and package.json overrides for unexpected redirects to alternative maintainer namespaces
  • Verify integrity of @anthropic-ai/claude-agent-sdk-* packages and reinstall from official sources
  • Monitor for any agenthub-empty package updates and block or remove if present
  • Implement npm package pinning and integrity verification in CI/CD pipelines

Sources

  1. GitHub Advisory GHSA-hw95-mqx2-4pg5 · GitHub Advisory Database

Cite this entry

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

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 vite-vue-path-map (npm)

    The npm package vite-vue-path-map contained malicious code that injected obfuscated JavaScript into production builds. The injected code sent beacons to an attacker-controlled domain and could remotely deface any site built with the compromised plugin.

    npmCompromised packageMalicious maintainer
  2. resolvedcritical

    Malicious code in @lyxa.ai/core (npm)

    The npm package @lyxa.ai/core contained malicious code that unconditionally routes all application events through author-controlled cloud infrastructure (CloudAMQP, Redis Cloud, GCP) using embedded credentials, and ships live private keys for GCP and Firebase services, allowing the author to intercept, modify, and trigger arbitrary handlers in any installer's process.

    npmAI agents & skillsCompromised packageMalicious maintainer
  3. containedcritical

    Malicious code in opencode-optimised-toolings (npm)

    opencode-optimised-toolings@4.0.0 contains malicious code that downloads and builds an unauthorized opencode binary from a non-publisher GitHub repository, replaces the legitimate opencode executable on the user's PATH, and establishes persistent code execution with user privileges. The package modifies configuration files to ensure the malicious pipeline continues on future invocations.

    npmCompromised packageMalicious maintainer
  4. activecritical

    Malicious code in aclade-agent (npm)

    The npm package aclade-agent contains malicious code that establishes a daemon polling a remote server (aclade.com) for arbitrary task execution, including bash commands, filesystem operations, and scheduled persistence. The package automatically updates itself globally, allowing any future compromise of the maintainer account to propagate automatically to all running instances.

    npmCompromised packageMalicious maintainer