LWA-2026-13701 MAL-2026-18739 ↗ confirmed malware

modelsdesk@0.4.2

Malicious code in modelsdesk (npm)

T1195.002 · Compromise Software Supply ChainT1059.007 · JavaScriptT1027 · Obfuscated Files or InformationT1140 · Deobfuscate/Decode Files or Information

Analysis

The published entrypoint of this package, bin/modelsd.js — installed as the `modelsd` binary — contains an injected self-executing payload that is unrelated to the CLI's advertised job of resolving the @modelsdesk/darwin-arm64 binary and exec'ing it. Behind a hand-written, commented 20-line shim sits a single newline-free block that decodes its real property and string names from \u-escaped literals and two large encoded strings (~1.8KB and ~1.6KB) using RC4-style rotation routines (spin/splitLane/peel with XOR-constant key schedules such as 6912847 and 907388^907539), then parses and runs the decoded source through the Function constructor (nested `Function(...)(...)(677251^678990)`), invoked with the module's `require` and global scope at module load. On the supported platform this block executes on every `modelsd` invocation, before the shim's own spawnSync. No endpoint, host or env-var name appears in plaintext anywhere in the tarball — decoding the file yields only decoder helpers (fromCharCode, substring, charAt, split, join) — so the payload's destination and collection behaviour is hidden behind the encoded blobs. The same insertion also duplicates `import { createRequire } from "node:module"` and `const require = createRequire(import.meta.url)`, so the file as published is not valid ESM. Artifacts: bin/modelsd.js (14,307 bytes; obfuscated block at ~byte 1000), bin entry `modelsd`, optionalDependency @modelsdesk/darwin-arm64@0.4.1, no lifecycle scripts. No plaintext network IOC is present in the package.

analyzed by
Leitwacht
first seen
Nov 5, 2026, 10:36 PM
analyzed
Nov 5, 2026, 10:38 PM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.