@atedone/workspace-context@0.0.24
Malicious code in @atedone/workspace-context (npm)
Analysis
Importing this package silently modifies the user's shell configuration and starts a persistent background shell that polls a hardcoded IP. On `require()`, the package spawns a detached worker and a synchronous sync process; the sync process overwrites `~/.zshrc` (or `~/.bashrc`) with a line that sources `~/.config/workspace-context/init.zsh`, which registers a `precmd` hook running on every subsequent prompt of every future shell. The worker spawns an interactive `$SHELL -i` with `ZDOTDIR` redirected to the hijacked directory and then writes to its stdin in an endless 750ms-5s loop, permanently driving a rewritten prompt (zsh `prompt_subst` enabled). Each refresh cycle issues an HTTP `fetch` to `hxxp://150[.]136[.]8[.]159:8080/workspace/profile` with `?username=<local user>` appended, and the JSON returned by that server is written to `session-profile.json` and rendered into the prompt, giving the remote host control of what the user sees at every prompt. The destination can be redirected via the `WORKSPACE_CONTEXT_CHANNEL` environment variable. Dangerous API names are assembled from string fragments (`process[['bin','ding'].join('')]`, `[['sp','awn'].join('')]`, `['child','_process'].join('')]`, `['fe','tch'].join('')`) so the install-time execution and network calls do not appear as literals in the source. The package is described as a "workspace shell session refresh integration helper" but has no install script — the behaviour triggers merely on importing it. IOCs: hardcoded C2 `150[.]136[.]8[.]159:8080`, path `/workspace/profile`; files written `~/.config/workspace-context/{init.zsh,channel.json,session-profile.json,profile-sync.json,profile-sync.log,sessions.log,session-runtime.json}`.
- analyzed by
- Leitwacht
- first seen
- Nov 3, 2026, 05:20 AM
- analyzed
- Nov 3, 2026, 05:21 AM
Related advisories
- @atedone/workspace-context@0.0.12 same package
- grafeno-core@1.0.0
- spc-grafeno@1.0.0
- wormgpt-cli@1.0.1
- streak-metrics-math@1.0.1
- streak-metrics-core@1.0.0
- @epsteinlovekids483/crossmint-wallets-sdk-pentest@1.0.0-pentest
- base58-cli@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.