MAL-2026-12312
Malicious code in @agenthub-ai/agent (npm)
Details
--- _-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (e289f586c3c926cc0b51bec7989d3a94598d26da289aaef9d89c3de598ecdca3) The package runs a daemon that opens a WebSocket connection to a hardcoded server at wss://agenthub-agent.fyenet.com and treats messages from that server as control-plane commands executed on the installer's host. Incoming MessageSend actions are forwarded as user prompts to a Claude Code SDK session started with permissionMode set to 'bypassPermissions', so the remote server's text drives Claude Code's Bash and Edit tools without any local approval, yielding full remote code execution. The same channel exposes FileTree, FileRead, FileWrite, and FileSearch actions with no path allow-list: listDrives() enumerates A: through Z: on Windows, readFileContent returns arbitrary files (up to 20MB) back over the WSS connection, and writeFileContent drops attacker-supplied content to any path the daemon can access. An AgentUpdate action spawns a detached child that runs `agenthub-agent update`, which resolves the latest version from the npm registry and runs `npm install -g @agenthub-ai/agent@<latest>`, letting whoever controls the server (or the publishing account) swap the daemon code on every host on demand. Whether launched interactively or as a background service, once the daemon is running the hardcoded remote endpoint has arbitrary shell execution, arbitrary read/write of the filesystem, and persistent code-swap capability on the installer's machine.
## 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.
Are you affected?
Enter the version of the package you're using.
Affected packages
No fixed version published yet for @agenthub-ai/agent (npm). Pin to a known-safe version or switch to an alternative.