MAL-2026-10721

    Dashboard / Malicious Package / MAL-2026-10721

    MAL-2026-10721

    Published: 16 Jul 2026Last Modified: 6 Aug 2026

    Summary: Malicious code in @whalent/agent (npm)

    Details: 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.

    References: https://www.npmjs.com/package/@whalent/agent/v/0.3.231, https://www.npmjs.com/package/@whalent/agent/v/0.3.283, https://www.npmjs.com/package/@whalent/agent/v/0.3.295, https://www.npmjs.com/package/@whalent/agent/v/0.3.282, https://www.npmjs.com/package/@whalent/agent/v/0.3.280, https://www.npmjs.com/package/@whalent/agent/v/0.3.296, https://www.npmjs.com/package/@whalent/agent/v/0.3.277, https://www.npmjs.com/package/@whalent/agent/v/0.3.297, https://www.npmjs.com/package/@whalent/agent/v/0.3.272, https://www.npmjs.com/package/@whalent/agent/v/0.3.285, https://www.npmjs.com/package/@whalent/agent/v/0.3.298, https://www.npmjs.com/package/@whalent/agent/v/0.3.291, https://www.npmjs.com/package/@whalent/agent/v/0.3.279, https://www.npmjs.com/package/@whalent/agent/v/0.3.281, https://www.npmjs.com/package/@whalent/agent/v/0.3.253, https://www.npmjs.com/package/@whalent/agent/v/0.3.244, https://www.npmjs.com/package/@whalent/agent/v/0.3.269, https://www.npmjs.com/package/@whalent/agent/v/0.3.264, https://www.npmjs.com/package/@whalent/agent/v/0.3.247, https://www.npmjs.com/package/@whalent/agent/v/0.3.251, https://www.npmjs.com/package/@whalent/agent/v/0.3.240, https://www.npmjs.com/package/@whalent/agent/v/0.3.239, https://www.npmjs.com/package/@whalent/agent/v/0.3.263, https://www.npmjs.com/package/@whalent/agent/v/0.3.243, https://www.npmjs.com/package/@whalent/agent/v/0.3.233, https://www.npmjs.com/package/@whalent/agent/v/0.3.252, https://www.npmjs.com/package/@whalent/agent/v/0.3.250, https://www.npmjs.com/package/@whalent/agent/v/0.3.238, https://www.npmjs.com/package/@whalent/agent/v/0.3.255, https://www.npmjs.com/package/@whalent/agent/v/0.3.235, https://www.npmjs.com/package/@whalent/agent/v/0.3.248, https://www.npmjs.com/package/@whalent/agent/v/0.3.268, https://www.npmjs.com/package/@whalent/agent/v/0.3.261, https://www.npmjs.com/package/@whalent/agent/v/0.3.230, https://www.npmjs.com/package/@whalent/agent/v/0.3.241, https://www.npmjs.com/package/@whalent/agent/v/0.3.234, https://www.npmjs.com/package/@whalent/agent/v/0.3.249, https://www.npmjs.com/package/@whalent/agent/v/0.3.232, https://www.npmjs.com/package/@whalent/agent/v/0.3.254, https://www.npmjs.com/package/@whalent/agent/v/0.3.265, https://www.npmjs.com/package/@whalent/agent/v/0.3.302

    Affected packages

    Package

    Name: @whalent/agent

    Purl: pkg:npm/%40whalent/agent

    Affected ranges

    Type: N/A

    Events:

    Introduced- None
    Fixed -None

    Affected versions

    0.3.231
    0.3.283
    0.3.295
    0.3.282
    0.3.280
    0.3.296
    0.3.277
    0.3.297
    0.3.272
    0.3.285
    0.3.298
    0.3.291
    0.3.279
    0.3.281
    0.3.253
    0.3.244
    0.3.269
    0.3.264
    0.3.247
    0.3.251
    0.3.240
    0.3.239
    0.3.263
    0.3.243
    0.3.233
    0.3.252
    0.3.250
    0.3.238
    0.3.255
    0.3.235
    0.3.248
    0.3.268
    0.3.261
    0.3.230
    0.3.241
    0.3.234
    0.3.249
    0.3.232
    0.3.254
    0.3.265
    0.3.302
    MAL-2026-10721 | CVE-DB