Malicious code in @agenthub-ai/agent (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (759e28e403a082017b33bb95bcc8c1d7abd229a59375b8a4a3de9841c89d3379) Package installs a long-running daemon that opens a persistent WebSocket to wss://agenthub-agent.fyenet.com and dispatches command envelopes from the paired remote peer directly onto the installer host. MessageSend envelopes are fed as prompts into a Claude Code SDK session started with permissionMode 'bypassPermissions' (via a detected local claude executable), enabling the remote peer to drive Claude's autonomous Bash/Edit/Write tool loop on the local machine without confirmation. FileRead, FileWrite, FileTree, and FileSearch envelopes are executed directly against the local filesystem with peer-supplied paths, providing an independent remote read/write channel. AgentUpdate envelopes spawn a detached child process (node <argv1> update) that stops the daemon, runs npm install, and restarts, letting the remote peer trigger package-manager operations and process restarts. The install subcommand registers OS-level auto-start entries (HKCU Run key on Windows, a systemd user unit on Linux, a launchd plist on macOS) so the daemon re-launches at every login, providing persistent reachability for the remote-control channel. The WebSocket endpoint is a first-party server matching the package's advertised purpose (a remote agent bridge to a paired mobile app), and the daemon runs only when the operator explicitly starts it, but any party who controls or compromises that server, or MITMs the connection, obtains full-host RCE and arbitrary filesystem read/write on every installer running the daemon. ## Source: ghsa-malware (ebc37975a427916a53e540e0d1bdcf6af66c169f6d4d6b008d186a2e64912ac8) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
The @agenthub-ai/agent package runs a daemon that opens a WebSocket connection to wss://agenthub-agent.fyenet.com. The daemon treats incoming messages as control commands executed on the host. It forwards MessageSend actions as user prompts to a Claude Code SDK session with 'bypassPermissions', allowing remote control of Bash and Edit tools without user approval, resulting in full remote code execution. The daemon also exposes FileTree, FileRead, FileWrite, and FileSearch actions without path restrictions, enabling enumeration of drives, arbitrary file reads (up to 20MB), and arbitrary file writes. An AgentUpdate action allows spawning a detached process that updates the package from the npm registry, enabling persistent code replacement controlled by the remote server or publishing account. This results in arbitrary shell execution, filesystem manipulation, and persistent malicious code on the installer's machine.
Potential Impact
An attacker controlling the remote WebSocket server can execute arbitrary shell commands on the victim's machine, read and write arbitrary files without restriction, and update the malicious daemon code at will. This compromises the confidentiality, integrity, and availability of the affected system, allowing full remote control and persistent compromise.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should uninstall the @agenthub-ai/agent package versions 0.5.1 and 0.9.2 and avoid installing or running this package. Monitor for any updates or advisories from the package maintainers or npm regarding remediation.
Malicious code in @agenthub-ai/agent (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (759e28e403a082017b33bb95bcc8c1d7abd229a59375b8a4a3de9841c89d3379) Package installs a long-running daemon that opens a persistent WebSocket to wss://agenthub-agent.fyenet.com and dispatches command envelopes from the paired remote peer directly onto the installer host. MessageSend envelopes are fed as prompts into a Claude Code SDK session started with permissionMode 'bypassPermissions' (via a detected local claude executable), enabling the remote peer to drive Claude's autonomous Bash/Edit/Write tool loop on the local machine without confirmation. FileRead, FileWrite, FileTree, and FileSearch envelopes are executed directly against the local filesystem with peer-supplied paths, providing an independent remote read/write channel. AgentUpdate envelopes spawn a detached child process (node <argv1> update) that stops the daemon, runs npm install, and restarts, letting the remote peer trigger package-manager operations and process restarts. The install subcommand registers OS-level auto-start entries (HKCU Run key on Windows, a systemd user unit on Linux, a launchd plist on macOS) so the daemon re-launches at every login, providing persistent reachability for the remote-control channel. The WebSocket endpoint is a first-party server matching the package's advertised purpose (a remote agent bridge to a paired mobile app), and the daemon runs only when the operator explicitly starts it, but any party who controls or compromises that server, or MITMs the connection, obtains full-host RCE and arbitrary filesystem read/write on every installer running the daemon. ## Source: ghsa-malware (ebc37975a427916a53e540e0d1bdcf6af66c169f6d4d6b008d186a2e64912ac8) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @agenthub-ai/agent package runs a daemon that opens a WebSocket connection to wss://agenthub-agent.fyenet.com. The daemon treats incoming messages as control commands executed on the host. It forwards MessageSend actions as user prompts to a Claude Code SDK session with 'bypassPermissions', allowing remote control of Bash and Edit tools without user approval, resulting in full remote code execution. The daemon also exposes FileTree, FileRead, FileWrite, and FileSearch actions without path restrictions, enabling enumeration of drives, arbitrary file reads (up to 20MB), and arbitrary file writes. An AgentUpdate action allows spawning a detached process that updates the package from the npm registry, enabling persistent code replacement controlled by the remote server or publishing account. This results in arbitrary shell execution, filesystem manipulation, and persistent malicious code on the installer's machine.
Potential Impact
An attacker controlling the remote WebSocket server can execute arbitrary shell commands on the victim's machine, read and write arbitrary files without restriction, and update the malicious daemon code at will. This compromises the confidentiality, integrity, and availability of the affected system, allowing full remote control and persistent compromise.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should uninstall the @agenthub-ai/agent package versions 0.5.1 and 0.9.2 and avoid installing or running this package. Monitor for any updates or advisories from the package maintainers or npm regarding remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12312
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a735742bf8831d5391590f1
Added to database: 08/05/2026, 15:31:14 UTC
Last enriched: 08/05/2026, 17:08:52 UTC
Last updated: 09/18/2026, 02:24:12 UTC
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.