Skip to content

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

Unknown
Published
Updated
Exploit status
No public exploit known

Description


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

Source: amazon-inspector (d8865ae7d25a498766280337f12ceea445a92bd6a6565e668651a79dbcc152e9)

The package's main/bin entry (dist/index.cjs) implements a remote agent that opens a WebSocket to a gateway configured via WHALENT_GATEWAY / WHALENT_TOKEN / WHALENT_PLATFORM_URL and, over that channel, drives local PTY sessions via node-pty, spawns shells against process.env.SHELL, bridges loopback services on 127.0.0.1:3389 (RDP) and 127.0.0.1:5900/5901 (VNC), and runs a Python Jupyter kernel sidecar (dist/jupyter_sidecar.py) that executes arbitrary NDJSON-delivered code cells. The remote party at the gateway therefore has interactive command and code execution on the installer's host, plus a channel to reach otherwise-loopback-bound RDP/VNC. The 13.6 MB dist/index.cjs is protected with obfuscator.io-style transforms — a rotated 105,426-entry string array, _0xNNNN identifier renaming, decoder wrappers, and control-flow flattening — hiding the gateway URLs, command dispatch, and upgrade logic from review. The bundle additionally contains an npmInstall code path plus WHALENT_NPM_REGISTRY and WHALENT_CORE_ENTRY environment configuration, and the README describes the package as one that is 'replaced by remote daemon upgrades', so the running agent can be instructed by the gateway to fetch and swap in a new version of @whalent/agent-core from a configurable registry, executing whatever code that fetched artifact contains. The net effect of installing and running this package is a persistent, remote-controlled RCE channel into the installer's machine with a self-update mechanism that can pull further code from a registry the remote party can influence.

Upgrade path

1 package: 0 fixed.

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

Affected products

ProductAffected versionsFixed in
whalent @whalent/agent-core(npm) = 0.3.230 No fix listed
whalent @whalent/agent-core(npm) = 0.3.231 No fix listed
whalent @whalent/agent-core(npm) = 0.3.232 No fix listed
whalent @whalent/agent-core(npm) = 0.3.233 No fix listed
whalent @whalent/agent-core(npm) = 0.3.254 No fix listed
whalent @whalent/agent-core(npm) = 0.3.280 No fix listed
whalent @whalent/agent-core(npm) = 0.3.298 No fix listed
whalent @whalent/agent-core(npm) = 0.3.294 No fix listed
whalent @whalent/agent-core(npm) = 0.3.295 No fix listed
whalent @whalent/agent-core(npm) = 0.3.277 No fix listed
whalent @whalent/agent-core(npm) = 0.3.278 No fix listed
whalent @whalent/agent-core(npm) = 0.3.282 No fix listed
whalent @whalent/agent-core(npm) = 0.3.276 No fix listed
whalent @whalent/agent-core(npm) = 0.3.296 No fix listed
whalent @whalent/agent-core(npm) = 0.3.275 No fix listed
whalent @whalent/agent-core(npm) = 0.3.271 No fix listed
whalent @whalent/agent-core(npm) = 0.3.297 No fix listed
whalent @whalent/agent-core(npm) = 0.3.291 No fix listed
whalent @whalent/agent-core(npm) = 0.3.289 No fix listed
whalent @whalent/agent-core(npm) = 0.3.273 No fix listed
whalent @whalent/agent-core(npm) = 0.3.288 No fix listed
whalent @whalent/agent-core(npm) = 0.3.279 No fix listed
whalent @whalent/agent-core(npm) = 0.3.244 No fix listed
whalent @whalent/agent-core(npm) = 0.3.250 No fix listed
whalent @whalent/agent-core(npm) = 0.3.255 No fix listed
Show 24 more
ProductAffected versionsFixed in
whalent @whalent/agent-core(npm) = 0.3.248 No fix listed
whalent @whalent/agent-core(npm) = 0.3.263 No fix listed
whalent @whalent/agent-core(npm) = 0.3.257 No fix listed
whalent @whalent/agent-core(npm) = 0.3.251 No fix listed
whalent @whalent/agent-core(npm) = 0.3.262 No fix listed
whalent @whalent/agent-core(npm) = 0.3.258 No fix listed
whalent @whalent/agent-core(npm) = 0.3.238 No fix listed
whalent @whalent/agent-core(npm) = 0.3.247 No fix listed
whalent @whalent/agent-core(npm) = 0.3.264 No fix listed
whalent @whalent/agent-core(npm) = 0.3.265 No fix listed
whalent @whalent/agent-core(npm) = 0.3.266 No fix listed
whalent @whalent/agent-core(npm) = 0.3.268 No fix listed
whalent @whalent/agent-core(npm) = 0.3.239 No fix listed
whalent @whalent/agent-core(npm) = 0.3.261 No fix listed
whalent @whalent/agent-core(npm) = 0.3.243 No fix listed
whalent @whalent/agent-core(npm) = 0.3.249 No fix listed
whalent @whalent/agent-core(npm) = 0.3.240 No fix listed
whalent @whalent/agent-core(npm) = 0.3.235 No fix listed
whalent @whalent/agent-core(npm) = 0.3.252 No fix listed
whalent @whalent/agent-core(npm) = 0.3.234 No fix listed
whalent @whalent/agent-core(npm) = 0.3.259 No fix listed
whalent @whalent/agent-core(npm) = 0.3.253 No fix listed
whalent @whalent/agent-core(npm) = 0.3.245 No fix listed
whalent @whalent/agent-core(npm) = 0.3.241 No fix listed

References