@whalent/agent-corenpm
Malicious code in @whalent/agent-core (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
The package's bundled runtime (dist/index.cjs) opens a WebSocket to a hardcoded gateway at wss://memory.whalent.com/gw/sdk/ws and integrates with node-pty and child_process spawn to run terminal sessions (SHELL / ComSpec, WHALENT_TERMINAL_BACKEND). Bytes arriving from that gateway drive a PTY on the installer's host, giving the gateway operator arbitrary command execution on any machine that runs this package. The README explicitly states the package is 'replaced by remote daemon upgrades,' meaning code arriving from the same author-controlled endpoint can swap the installed runtime with no visible version/signature pinning — a remote code-update channel over the same gateway. The runtime additionally references AI-provider session paths (claude.ai/settings/usage with session_id, chatgpt.com, api.openai.com/auth, ~/.claude and ~/.codex including settings.local, and ANTHROPIC_API_KEY) alongside POST/GET calls to https://memory.whalent.com/pt, indicating flow of AI-provider session identifiers and API keys from local config to the same hardcoded host. The entire 4.8 MB bundle is wrapped in obfuscator.io-style string-array indirection (rotated array a0_0x375d of length 14337, ~60485 decoder wrappers, ~53169 inlined decoded strings), reconstructing network destinations and command strings at runtime and hiding these behaviors from casual review.
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 @whalent/agent-core (4 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging @whalent/agent-core across your stack and pipelines.
If you installed it — respond
Remove @whalent/agent-core 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 @whalent/agent-core 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 @whalent/agent-core 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 @whalent/agent-core-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.