Skip to content

MAL-2026-10721 Malicious code in @whalent/agent (npm)

Unknown
Published
Updated
Exploit status
No public exploit known

Description


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (13a01c1162adb93d3960d9e1b1b67095dcf0a1ea72aefa6d471d0abbbabb5d9a)

The package installs a whalent CLI daemon that opens a persistent WebSocket connection (wss://) to a Whalent Memory gateway and, per its own README, accepts remote commands including 'upgrade' and 'restart' from that gateway. dist/index.cjs contains an npmInstallCommand builder that assembles npm install -g @whalent/agent@<version> --registry=<DEFAULT_NPM_REGISTRY|CHINA_NPM_REGISTRY> strings driven by the gateway's chosen version — meaning whoever controls (or compromises) the gateway can cause the daemon's host to install and execute an arbitrary version of the package as the user running the daemon. The core bundle additionally references process.env.SHELL and localhost RDP/VNC ports (127.0.0.1:3389, 5900, 5901), and the dependency set includes @xterm/headless, node-pty (optional), ssh2, and ws, indicating terminal/PTY and remote-session capability reachable from the same gateway channel. Both dist/index.cjs (main/bin entry) and the 13 MB dist/core.cjs are transformed with javascript-obfuscator (string-array rotator, _0x-named helpers, control-flow flattening), and javascript-obfuscator is listed in devDependencies — the obfuscation covers the gateway command dispatcher and shell sinks. The daemon fires only when the operator explicitly runs whalent --token …, not on npm install or on require(), but once running it provides a network-reachable code-execution and shell surface on the host controlled by the gateway operator.

Upgrade path

1 package: 0 fixed.

PackageAffectedFixed inStatus
whalent @whalent/agent(npm) = 0.3.230; = 0.3.231; = 0.3.232; = 0.3.233 +37 more No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
whalent @whalent/agent(npm) = 0.3.231 No fix listed
whalent @whalent/agent(npm) = 0.3.283 No fix listed
whalent @whalent/agent(npm) = 0.3.295 No fix listed
whalent @whalent/agent(npm) = 0.3.282 No fix listed
whalent @whalent/agent(npm) = 0.3.280 No fix listed
whalent @whalent/agent(npm) = 0.3.296 No fix listed
whalent @whalent/agent(npm) = 0.3.277 No fix listed
whalent @whalent/agent(npm) = 0.3.297 No fix listed
whalent @whalent/agent(npm) = 0.3.272 No fix listed
whalent @whalent/agent(npm) = 0.3.285 No fix listed
whalent @whalent/agent(npm) = 0.3.298 No fix listed
whalent @whalent/agent(npm) = 0.3.291 No fix listed
whalent @whalent/agent(npm) = 0.3.279 No fix listed
whalent @whalent/agent(npm) = 0.3.281 No fix listed
whalent @whalent/agent(npm) = 0.3.253 No fix listed
whalent @whalent/agent(npm) = 0.3.244 No fix listed
whalent @whalent/agent(npm) = 0.3.269 No fix listed
whalent @whalent/agent(npm) = 0.3.264 No fix listed
whalent @whalent/agent(npm) = 0.3.247 No fix listed
whalent @whalent/agent(npm) = 0.3.251 No fix listed
whalent @whalent/agent(npm) = 0.3.240 No fix listed
whalent @whalent/agent(npm) = 0.3.239 No fix listed
whalent @whalent/agent(npm) = 0.3.263 No fix listed
whalent @whalent/agent(npm) = 0.3.243 No fix listed
whalent @whalent/agent(npm) = 0.3.233 No fix listed
Show 16 more
ProductAffected versionsFixed in
whalent @whalent/agent(npm) = 0.3.252 No fix listed
whalent @whalent/agent(npm) = 0.3.250 No fix listed
whalent @whalent/agent(npm) = 0.3.238 No fix listed
whalent @whalent/agent(npm) = 0.3.255 No fix listed
whalent @whalent/agent(npm) = 0.3.235 No fix listed
whalent @whalent/agent(npm) = 0.3.248 No fix listed
whalent @whalent/agent(npm) = 0.3.268 No fix listed
whalent @whalent/agent(npm) = 0.3.261 No fix listed
whalent @whalent/agent(npm) = 0.3.230 No fix listed
whalent @whalent/agent(npm) = 0.3.241 No fix listed
whalent @whalent/agent(npm) = 0.3.234 No fix listed
whalent @whalent/agent(npm) = 0.3.249 No fix listed
whalent @whalent/agent(npm) = 0.3.232 No fix listed
whalent @whalent/agent(npm) = 0.3.254 No fix listed
whalent @whalent/agent(npm) = 0.3.265 No fix listed
whalent @whalent/agent(npm) = 0.3.302 No fix listed

References